File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change
1
+ # Guides
2
+
3
+ ## Getting started
4
+
5
+ - [ Using with Jest] ( using-with-jest.md )
6
+
7
+ ## Tesing single file components (SFCs)
8
+
9
+ - [ Testing SFCs with Jest] ( testing-SFCs-with-jest.md )
10
+
11
+ ## Using with plugins
12
+
13
+ - [ Using with Vuex] ( using-with-vuex.md )
Original file line number Diff line number Diff line change
1
+ ## Using with Jest
2
+
1
3
Jest and Vue Test Utils work great together.
2
4
3
- To get started, you need to install Jest and Vue Test Utils:
5
+ To get started, we need to install Jest and Vue Test Utils:
4
6
5
7
```
6
8
npm install --save-dev jest vue-test-utils
7
9
```
8
10
9
- Inside package.json, create an npm script that runs Jest:
11
+ Inside ` package.json ` , create an npm script that runs Jest:
10
12
11
13
```
12
14
"scripts": {
@@ -37,4 +39,9 @@ And run the tests from the command line:
37
39
npm run unit
38
40
```
39
41
40
- If you want to test .vue files, please see the testing SFCs with Jest guide.
42
+ To test .vue files, please see the [ testing SFCs with Jest guide] ( https://github.com/eddyerburgh/vue-test-utils-jest-example ) .
43
+
44
+ ## Resources
45
+
46
+ - [ Testing SFCs with Jest] ( testing-SFCs-with-jest.md )
47
+ - [ Example project with Jest and Vue Test Utils] ( https://github.com/eddyerburgh/vue-test-utils-jest-example )
You can’t perform that action at this time.
0 commit comments