Skip to content

Commit 48534f5

Browse files
authored
Merge pull request #20 from vuejs/dev
2 parents 37f402f + fdd1b32 commit 48534f5

File tree

3 files changed

+25
-21
lines changed

3 files changed

+25
-21
lines changed

docs/en/api/mount.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
- `{Object} slots`
1010
- `{Array<Componet|Object>|Component|String} default`
1111
- `{Array<Componet|Object>|Component|String} named`
12-
- `{Object} globals`
13-
- `{Object} instance`
14-
- `{Object} stub`
15-
16-
- **Arguments:**
12+
- `{Object} intercept`
13+
- `{Object|Array<string>} stubs`
14+
- `{boolean} clone`
15+
- `{Object} children`
16+
- `{Vue} localVue`
1717

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

@@ -27,6 +27,8 @@
2727

2828
`options.context` (`Object`): Passes context to functional component. Can only be used with functional components
2929

30+
`options.children` (`Array<string|Component|Function>`): Passes children to be rendered by functional components
31+
3032
`options.localVue` (`Object`): vue class to use in `mount`. See [createLocalVue](/api/createLocalVue.md)
3133

3234
`options.slots` (`Object`): Render component with slots.
@@ -35,9 +37,9 @@
3537

3638
`options.slots.name` (`Array[Component]|Component`): Named slots. i.e. slots.name will match a <slot name="name" />, can be a Vue component or array of Vue components
3739

38-
`options.globals` (`Object`): Add globals to Vue instance.
40+
`options.intercept` (`Object`): Add globals to Vue instance.
3941

40-
`options.stub` (`Object|Array<string>`): Stubs components matching the name. Takes object or array of strings
42+
`options.stubs` (`Object|Array<string>`): Stubs components matching the name. Takes object or array of strings
4143

4244
- **Usage:**
4345

docs/en/api/shallow.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
- `{Object} options`
77
- `{boolean} attachToDocument`
88
- `{Object} context`
9-
- `{Object} slots`
10-
- `{Array<Componet|Object>|Component|String} default`
11-
- `{Array<Componet|Object>|Component|String} named`
12-
- `{Object} globals`
13-
- `{Object} instance`
14-
- `{Object} stub`
15-
16-
- **Arguments:**
9+
- `{Object} slots`
10+
- `{Array<Componet|Object>|Component|String} default`
11+
- `{Array<Componet|Object>|Component|String} named`
12+
- `{Object} intercept`
13+
- `{Object|Array<string>} stubs`
14+
- `{boolean} clone`
15+
- `{Object} children`
16+
- `{Vue} localVue`
1717

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

@@ -27,6 +27,8 @@
2727

2828
`options.context` (`Object`): Passes context to functional component. Can only be used with functional components
2929

30+
`options.children` (`Array<string|Component|Function>`): Passes children to be rendered by functional components
31+
3032
`options.localVue` (`Object`): vue class to use in `mount`. See [createLocalVue](/api/createLocalVue.md)
3133

3234
`options.slots` (`Object`): Render component with slots.
@@ -35,9 +37,9 @@
3537

3638
`options.slots.name` (`Array[Component]|Component`): Named slots. i.e. slots.name will match a <slot name="name" />, can be a Vue component or array of Vue components
3739

38-
`options.globals` (`Object`): Add globals to Vue instance.
40+
`options.intercept` (`Object`): Add globals to Vue instance.
3941

40-
`options.stub` (`Object|Array<string>`): Stubs components matching the name. Takes object or array of strings
42+
`options.stubs` (`Object|Array<string>`): Stubs components matching the name. Takes object or array of strings
4143

4244
- **Usage:**
4345

docs/en/guides/using-with-vuex.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,21 @@ describe('Actions.vue', () => {
6969
const wrapper = mount(Actions, { store })
7070
const input = wrapper.find('input')[0]
7171
input.element.value = 'input'
72-
input.dispatch('input')
72+
input.trigger('input')
7373
expect(actions.actionInput.calledOnce).to.equal(true)
7474
})
7575

7676
it('does not call store action actionInput when input value is not input and an input even is fired', () => {
7777
const wrapper = mount(Actions, { store })
7878
const input = wrapper.find('input')[0]
7979
input.element.value = 'not input'
80-
input.dispatch('input')
80+
input.trigger('input')
8181
expect(actions.actionInput.calledOnce).to.equal(false)
8282
})
8383

8484
it('calls store action actionClick when button is clicked', () => {
8585
const wrapper = mount(Actions, { store })
86-
wrapper.find('button')[0].dispatch('click')
86+
wrapper.find('button')[0].trigger('click')
8787
expect(actions.actionClick.calledOnce).to.equal(true)
8888
})
8989
})
@@ -245,7 +245,7 @@ describe('Modules.vue', () => {
245245
it('calls store action moduleActionClick when button is clicked', () => {
246246
const wrapper = mount(Modules, { store })
247247
const button = wrapper.find('button')[0]
248-
button.dispatch('click')
248+
button.trigger('click')
249249
expect(actions.moduleActionClick.calledOnce).to.equal(true)
250250
})
251251

0 commit comments

Comments
 (0)