From 7ca314245c0e5d7d904e7b3159b225d0b6d9705e Mon Sep 17 00:00:00 2001 From: Lachlan Miller Date: Mon, 16 Dec 2019 20:29:50 +1000 Subject: [PATCH 1/3] (docs): Add guide for some useful libraries for testing --- docs/README.md | 1 + docs/guides/useful-libraries-for-testing.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 docs/guides/useful-libraries-for-testing.md 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..b6498233b --- /dev/null +++ b/docs/guides/useful-libraries-for-testing.md @@ -0,0 +1,16 @@ +## 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. From a0bf7f9d4d45e035f5c5cc789cefa7fee4d46c0e Mon Sep 17 00:00:00 2001 From: Lachlan Miller Date: Mon, 16 Dec 2019 21:15:27 +1000 Subject: [PATCH 2/3] (docs): run prettier --- docs/guides/useful-libraries-for-testing.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/guides/useful-libraries-for-testing.md b/docs/guides/useful-libraries-for-testing.md index b6498233b..254ef82d6 100644 --- a/docs/guides/useful-libraries-for-testing.md +++ b/docs/guides/useful-libraries-for-testing.md @@ -10,7 +10,6 @@ [`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. From 7a7c9c3f4ce770f2c3307fcb5211c9c0a5e27387 Mon Sep 17 00:00:00 2001 From: Lachlan Miller Date: Mon, 16 Dec 2019 21:36:16 +1000 Subject: [PATCH 3/3] (docs): change how we refer to vue-test-utils --- docs/guides/useful-libraries-for-testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/useful-libraries-for-testing.md b/docs/guides/useful-libraries-for-testing.md index 254ef82d6..84a4ce723 100644 --- a/docs/guides/useful-libraries-for-testing.md +++ b/docs/guides/useful-libraries-for-testing.md @@ -1,6 +1,6 @@ ## 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. +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`