Skip to content

Commit 4c9654b

Browse files
andreasvirkuseddyerburgh
authored andcommitted
docs: update shallow documentation (#251)
* Update shallow documentation Update shallow documentation to depict the children array that context can include. * Update options with context's children
1 parent d5bdcb9 commit 4c9654b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/en/api/options.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ Passes context to functional component. Can only be used with functional compone
2424
Example:
2525

2626
```js
27+
import Foo from './Foo.vue'
28+
import Bar from './Bar.vue'
29+
2730
const wrapper = mount(Component, {
2831
context: {
29-
props: { show: true }
32+
props: { show: true },
33+
children: [Foo, Bar]
3034
}
3135
})
3236

docs/en/api/shallow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
- `{Object} options`
77
- `{boolean} attachToDocument`
88
- `{Object} context`
9+
- `{Array<Component|Object>|Component} children`
910
- `{Object} slots`
1011
- `{Array<Componet|Object>|Component|String} default`
1112
- `{Array<Componet|Object>|Component|String} named`
1213
- `{Object} mocks`
1314
- `{Object|Array<string>} stubs`
1415
- `{boolean} clone`
15-
- `{Object} children`
1616
- `{Vue} localVue`
1717

1818
- **Returns:** `{Wrapper}`

0 commit comments

Comments
 (0)