You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vue options are passed to the component when a new instance is created. , e.g. `store`, `propsData`. For full list, see the [Vue API](https://vuejs.org/v2/api/). Also takes vue-test-utils options:
5
+
新しくインスタンスが作成されると、Vueオプションがコンポーネントに渡されます。例:`store`、`propsData`など。完全なリストについては[Vue API docs](https://vuejs.org/v2/api/)を参照してください。
`options` (`Object`): a Vue options object. Vue options are passed to the component when a new instance is created. , e.g. `store`, `propsData`. For full list, see the [Vue API](https://vuejs.org/v2/api/). Also takes vue-test-utils options:
19
+
### `context`
24
20
25
-
`options.attachToDocument` (`boolean`): Component will attach to DOM when rendered. This can be used with [`hasStyle`](/docs/en/api/wrapper/hasStyle.md) to check multi element CSS selectors
21
+
- 型: `Object`
26
22
27
-
`options.attrs` (`Object`): Attrs object to pass to component.
23
+
コンテキストを機能コンポーネントに渡します。 機能コンポーネントのみで使用できます。
28
24
29
-
`options.children` (`Array<string|Component|Function>`): Passes children to be rendered by functional components
25
+
例:
30
26
31
-
`options.clone` (`boolean`): Clones component before editing if `true`, does not if `false`. Defaults to `true`
32
-
33
-
`options.context` (`Object`): Passes context to functional component. Can only be used with functional components
34
-
35
-
`options.intercept` (`Object`): Add globals to Vue instance.
36
-
37
-
`options.localVue` (`Object`): vue class to use in `mount`. See [createLocalVue](/docs/en/api/createLocalVue.md)
38
-
39
-
`options.propsData` (`Object`): Data for props in component
40
-
41
-
`options.slots` (`Object`): Render component with slots.
42
-
43
-
`options.slots.default` (`Array[Component]|Component|String`): Default slot object to render, can be a Vue component or array of Vue components
27
+
```js
28
+
constwrapper=mount(Component, {
29
+
context: {
30
+
props: { show:true }
31
+
}
32
+
})
44
33
45
-
`options.slots.name` (`Array[Component]|Component`): Named slots. i.e. slots.name will match a <slotname="name" />, can be a Vue component or array of Vue components
34
+
expect(wrapper.is(Component)).toBe(true)
35
+
```
46
36
47
-
`options.stubs` (`Object|Array<string>`): Stubs components matching the name. Takes object or array of strings
37
+
### `slots`
48
38
49
-
`options.provide` (`Object`): Provides value to component
0 commit comments