diff --git a/docs/README.md b/docs/README.md index dd791d4f8..c4506197e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,6 +14,7 @@ Vue Test Utils is the official unit testing utility library for Vue.js. - [Using with TypeScript](guides/using-with-typescript.md) - [Using with Vue Router](guides/using-with-vue-router.md) - [Using with Vuex](guides/using-with-vuex.md) + - [Useful Libraries for Testing](guides/useful-libraries-for-testing.md) - [API](api/) - [mount](api/mount.md) - [shallowMount](api/shallowMount.md) diff --git a/docs/guides/useful-libraries-for-testing.md b/docs/guides/useful-libraries-for-testing.md new file mode 100644 index 000000000..84a4ce723 --- /dev/null +++ b/docs/guides/useful-libraries-for-testing.md @@ -0,0 +1,15 @@ +## Useful Libraries for Testing + +Vue Test Utils provides useful methods for testing Vue components. Community members have also written some additional libraries which either extend `vue-test-utils` with extra useful methods, or provide tools for testing other things found in Vue applications. + +### `vuex-mock-store` + +[`vuex-mock-store`](https://github.com/posva/vuex-mock-store) provides a simple and straightforward mock store to simplify testing components consuming a Vuex store. + +### `jest-matcher-vue-test-utils` + +[`jest-matcher-vue-test-utils`](https://github.com/hmsk/jest-matcher-vue-test-utils) adds additional matchers for the Jest test runner with the goal of making assertions more expressive. + +### `jest-mock-axios` + +[`jest-mock-axios`](https://github.com/knee-cola/jest-mock-axios) allows you to easily mock `axios`, a common HTTP client, in your tests. It works out of the box with Jest, and the author provides guidance on supporting other test runners in the documentation.