Skip to content

Commit 88c5111

Browse files
committed
docs: add info to docs README
1 parent 5fa1028 commit 88c5111

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/en/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,33 @@
33
vue-test-utils is the official test library for Vue.js.
44

55
It provides methods for unit testing Vue components.
6+
7+
## Example
8+
9+
```js
10+
import { mount } from 'vue-test-utils'
11+
import Counter from './Counter.vue'
12+
13+
const wrapper = mount(Counter)
14+
wrapper.find('button').trigger('click')
15+
expect(wrapper.text()).toContain('1')
16+
```
17+
18+
19+
## Getting started
20+
21+
To get started using Vue Test Utils, please see [using with jest]().
22+
23+
If you're new to unit testing, please read our [introduction to unit tests]().
24+
25+
## Testing single file components (SFCs)
26+
27+
- [Testing SFCs with Jest](guides/testing-SFCs-with-jest.md)
28+
- [Testing SFCs with Mocha](guides/testing-SFCs-with-mocha-webpack.md)
29+
30+
## Example projects
31+
32+
- [example with Jest](https://github.com/eddyerburgh/vue-test-utils-jest-example)
33+
- [example with Mocha](https://github.com/eddyerburgh/vue-test-utils-mocha-example)
34+
- [example with tape](https://github.com/eddyerburgh/vue-test-utils-tape-example)
35+
- [example with AVA](https://github.com/eddyerburgh/vue-test-utils-ava-example)

0 commit comments

Comments
 (0)