Skip to content

Commit 34aadf2

Browse files
author
Jamie Stumme
committed
docs(api): update stubs documentation
1 parent 68640c1 commit 34aadf2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Diff for: docs/api/mount.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ describe('Foo', () => {
116116
it('renders a div', () => {
117117
const wrapper = mount(Foo, {
118118
stubs: {
119-
Bar: '<div class="stubbed" />',
119+
Bar: '<div class="stubbed" />', // DEPRECATED
120120
BarFoo: true,
121121
FooBar: Faz
122122
}

Diff for: docs/api/options.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,13 @@ const wrapper = mount(WrapperComp).find(ComponentUnderTest)
208208

209209
## stubs
210210

211-
- type: `{ [name: string]: Component | boolean } | Array<string>`
211+
- type: `{ [name: string]: Component | string | boolean } | Array<string>`
212212

213213
Stubs child components. Can be an Array of component names to stub, or an object. If `stubs` is an Array, every stub is `<${component name}-stub>`.
214214

215+
Depercation note:
216+
If declaring an object, string stubs are now deprecated and will be removed in a future version.
217+
215218
Example:
216219

217220
```js

0 commit comments

Comments
 (0)