Skip to content

Commit 90e2782

Browse files
authored
Merge pull request #1372 from vuejs/docs/issue-1060-add-libraries-links
(docs): Add guide for some useful libraries for testing
2 parents 3115396 + 7a7c9c3 commit 90e2782

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Vue Test Utils is the official unit testing utility library for Vue.js.
1414
- [Using with TypeScript](guides/using-with-typescript.md)
1515
- [Using with Vue Router](guides/using-with-vue-router.md)
1616
- [Using with Vuex](guides/using-with-vuex.md)
17+
- [Useful Libraries for Testing](guides/useful-libraries-for-testing.md)
1718
- [API](api/)
1819
- [mount](api/mount.md)
1920
- [shallowMount](api/shallowMount.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Useful Libraries for Testing
2+
3+
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.
4+
5+
### `vuex-mock-store`
6+
7+
[`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.
8+
9+
### `jest-matcher-vue-test-utils`
10+
11+
[`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.
12+
13+
### `jest-mock-axios`
14+
15+
[`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.

0 commit comments

Comments
 (0)