Skip to content

Commit 2907de9

Browse files
committed
Merge branch 'upstream/dev' into translate-ja
2 parents 6a5d011 + 73b6bc9 commit 2907de9

File tree

9 files changed

+41
-15
lines changed

9 files changed

+41
-15
lines changed

docs/en/README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,24 @@
1111
* [Using with Vue Router](guides/using-with-vue-router.md)
1212
* [Using with Vuex](guides/using-with-vuex.md)
1313
* [API](api/README.md)
14-
* [createLocalVue](api/createLocalVue.md)
1514
* [mount](api/mount.md)
1615
* [shallow](api/shallow.md)
1716
* [Mounting Options](api/options.md)
17+
- [context](api/options.md#context)
18+
- [slots](api/options.md#slots)
19+
- [stubs](api/options.md#stubs)
20+
- [mocks](api/options.md#mocks)
21+
- [localVue](api/options.md#localvue)
22+
- [attachToDocument](api/options.md#attachtodocument)
23+
- [attrs](api/options.md#attrs)
24+
- [listeners](api/options.md#listeners)
25+
- [clone](api/options.md#clone)
1826
* [Wrapper](api/wrapper/README.md)
1927
* [contains](api/wrapper/contains.md)
28+
* [emitted](api/wrapper/emitted.md)
29+
* [emittedByOrder](api/wrapper/emittedByOrder.md)
2030
* [find](api/wrapper/find.md)
31+
* [findAll](api/wrapper/findAll.md)
2132
* [hasAttribute](api/wrapper/hasAttribute.md)
2233
* [hasClass](api/wrapper/hasClass.md)
2334
* [hasProp](api/wrapper/hasProp.md)
@@ -27,11 +38,12 @@
2738
* [isEmpty](api/wrapper/isEmpty.md)
2839
* [isVueInstance](api/wrapper/isVueInstance.md)
2940
* [name](api/wrapper/name.md)
30-
* [update](api/wrapper/update.md)
3141
* [setData](api/wrapper/setData.md)
42+
* [setMethods](api/wrapper/setMethods.md)
3243
* [setProps](api/wrapper/setProps.md)
3344
* [text](api/wrapper/text.md)
3445
* [trigger](api/wrapper/trigger.md)
46+
* [update](api/wrapper/update.md)
3547
* [WrapperArray](api/wrapper-array/README.md)
3648
* [at](api/wrapper-array/at.md)
3749
* [contains](api/wrapper-array/contains.md)
@@ -42,8 +54,10 @@
4254
* [is](api/wrapper-array/is.md)
4355
* [isEmpty](api/wrapper-array/isEmpty.md)
4456
* [isVueInstance](api/wrapper-array/isVueInstance.md)
45-
* [update](api/wrapper-array/update.md)
4657
* [setData](api/wrapper-array/setData.md)
58+
* [setMethods](api/wrapper-array/setMethods.md)
4759
* [setProps](api/wrapper-array/setProps.md)
4860
* [trigger](api/wrapper-array/trigger.md)
61+
* [update](api/wrapper-array/update.md)
4962
* [Selectors](api/selectors.md)
63+
* [createLocalVue](api/createLocalVue.md)

docs/en/api/mount.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# mount(component,{,options}])
1+
# mount(component {, options}])
22

33
- **Arguments:**
44

docs/en/api/shallow.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# shallow(component,{,options}])
1+
# shallow(component {, options}])
22

33
- **Arguments:**
44

@@ -19,15 +19,15 @@
1919

2020
- **Options:**
2121

22-
See [options](/docs/en/api/options.md)
22+
See [options](./options.md)
2323

2424
- **Usage:**
2525

26-
Returns [`Wrapper`](/docs/en/api/wrapper/README.md) of first DOM node or Vue component matching selector.
26+
Returns [`Wrapper`](./wrapper/README.md) of first DOM node or Vue component matching selector.
2727

2828
Stubs all child components.
2929

30-
Use any valid [selector](/docs/en/api/selectors.md).
30+
Use any valid [selector](./selectors.md).
3131

3232
**Without options:**
3333

docs/en/api/wrapper/find.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ const bar = wrapper.find(Bar)
2424
expect(bar.is(Bar)).toBe(true)
2525
```
2626

27-
- **See also:** [Wrapper](/docs/en/api/wrapper/README.md)
27+
- **See also:** [Wrapper](README.md)

docs/en/guides/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
* [Using with Jest](./using-with-jest.md)
77
* [Testing SFCs with Jest](./testing-SFCs-with-jest.md)
88
* [Testing SFCs with Mocha + webpack](./testing-SFCs-with-mocha-webpack.md)
9+
* [Using with Vue Router](./using-with-vue-router.md)
910
* [Using with Vuex](./using-with-vuex.md)

docs/en/guides/common-tips.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ expect(wrapper.emitted().foo.length).toBe(2)
5858
expect(wrapper.emitted().foo[1]).toEqual([123])
5959
```
6060

61-
You can also get an Array of the events in their emit order by calling [wrapper.emittedByOrder()](../api/emittedByOrder.md).
61+
You can also get an Array of the events in their emit order by calling [wrapper.emittedByOrder()](../api/wrapper/emittedByOrder.md).
6262

6363
## Manipulating Component State
6464

@@ -86,7 +86,7 @@ mount(Component, {
8686

8787
You can also update the props of an already-mounted component with the `wrapper.setProps({})` method.
8888

89-
*For a full list of options, please see the [mount options section](./api/options.md) of the docs.*
89+
*For a full list of options, please see the [mount options section](../api/options.md) of the docs.*
9090

9191
## Applying Global Plugins and Mixins
9292

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ describe('Actions.vue', () => {
6767
})
6868
})
6969

70-
it('calls store action actionInput when input value is input and an input even is fired', () => {
70+
it('calls store action actionInput when input value is input and an input event is fired', () => {
7171
const wrapper = shallow(Actions, { store, localVue })
7272
const input = wrapper.find('input')
7373
input.element.value = 'input'
7474
input.trigger('input')
7575
expect(actions.actionInput).toHaveBeenCalled()
7676
})
7777

78-
it('does not call store action actionInput when input value is not input and an input even is fired', () => {
78+
it('does not call store action actionInput when input value is not input and an input event is fired', () => {
7979
const wrapper = shallow(Actions, { store, localVue })
8080
const input = wrapper.find('input')
8181
input.element.value = 'not input'

src/create-local-vue.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ function createLocalVue (): Component {
3030

3131
// compat for vue-router < 2.7.1 where it does not allow multiple installs
3232
const use = instance.use
33-
instance.use = (plugin) => {
33+
instance.use = (plugin, ...rest) => {
3434
plugin.installed = false
3535
plugin.install.installed = false
36-
use.call(instance, plugin)
36+
use.call(instance, plugin, ...rest)
3737
}
3838
return instance
3939
}

test/unit/specs/create-local-vue.spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,15 @@ describe('createLocalVue', () => {
9595
const freshWrapper = mount(Component)
9696
expect(typeof freshWrapper.vm.$route).to.equal('undefined')
9797
})
98+
99+
it('use can take additional arguments', () => {
100+
const localVue = createLocalVue()
101+
const pluginOptions = { foo: 'bar' }
102+
const plugin = {
103+
install: function (_Vue, options) {
104+
expect(options).to.equal(pluginOptions)
105+
}
106+
}
107+
localVue.use(plugin, pluginOptions)
108+
})
98109
})

0 commit comments

Comments
 (0)