Skip to content

Commit 93a11e0

Browse files
committed
docs: add config to docs README
1 parent b020d4b commit 93a11e0

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

docs/en/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,4 @@
7171
* [TransitionGroupStub](api/components/TransitionGroupStub.md)
7272
* [Selectors](api/selectors.md)
7373
* [createLocalVue](api/createLocalVue.md)
74+
* [config](api/config.md)

docs/en/api/config.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Config
2+
3+
vue-test-utils includes a config object to defined options used by vue-test-utils.
4+
5+
## `vue-test-utils` Config Options
6+
7+
### `stubs`
8+
9+
- type: `Object`
10+
- default: `{
11+
transition: TransitionStub,
12+
'transition-group': TransitionGroupStub
13+
}`
14+
15+
Stubs to use in components. These are overwritten by `stubs` passed in the mounting options.
16+
17+
When passing `stubs` as an array in the mounting options, `config.stubs` are converted to an array, and will stub components with a basic component that returns a div.
18+
19+
Example:
20+
21+
```js
22+
import VueTestUtils from 'vue-test-utils'
23+
24+
VueTestUtils.config.stubs['my-compomnent'] = '<div />'
25+
```

0 commit comments

Comments
 (0)