@@ -4,11 +4,13 @@ import { mount, createLocalVue } from '~vue/test-utils'
4
4
import Component from '~resources/components/component.vue'
5
5
import ComponentWithProps from '~resources/components/component-with-props.vue'
6
6
import ComponentWithMixin from '~resources/components/component-with-mixin.vue'
7
+ import ComponentAsAClass from '~resources/components/component-as-a-class.vue'
7
8
import { injectSupported , vueVersion } from '~resources/utils'
8
9
import {
9
10
describeRunIf ,
10
11
itDoNotRunIf
11
12
} from 'conditional-specs'
13
+ import Vuex from 'vuex'
12
14
13
15
describeRunIf ( process . env . TEST_ENV !== 'node' ,
14
16
'mount' , ( ) => {
@@ -195,6 +197,17 @@ describeRunIf(process.env.TEST_ENV !== 'node',
195
197
expect ( wrapper . vm . $options . listeners ) . to . equal ( undefined )
196
198
} )
197
199
200
+ it ( 'handles store correctly' , ( ) => {
201
+ const localVue = createLocalVue ( )
202
+ localVue . use ( Vuex )
203
+ const store = new Vuex . Store ( )
204
+ const wrapper = mount ( ComponentAsAClass , {
205
+ store,
206
+ localVue
207
+ } )
208
+ console . log ( wrapper . vm . $store . getters )
209
+ } )
210
+
198
211
it ( 'propagates errors when they are thrown' , ( ) => {
199
212
const TestComponent = {
200
213
template : '<div></div>' ,
@@ -261,7 +274,7 @@ describeRunIf(process.env.TEST_ENV !== 'node',
261
274
Vue . config . errorHandler = null
262
275
} )
263
276
264
- it ( 'overwrites the component options with the options other than the mounting options when the options for mount contain those ' , ( ) => {
277
+ it ( 'overwrites the component options with the instance options' , ( ) => {
265
278
const Component = {
266
279
template : '<div>{{ foo() }}{{ bar() }}{{ baz() }}</div>' ,
267
280
methods : {
0 commit comments