1
1
import Vuex from 'vuex'
2
- import { shallow , createLocalVue } from '../'
2
+ import { shallowMount , createLocalVue } from '../'
3
3
import { normalOptions , functionalOptions , Normal , ClassComponent } from './resources'
4
4
5
5
/**
6
6
* Should create wrapper vm based on (function) component options or constructors
7
7
* The users can specify component type via the type parameter
8
8
*/
9
- const normalWrapper = shallow ( normalOptions )
9
+ const normalWrapper = shallowMount ( normalOptions )
10
10
const normalFoo : string = normalWrapper . vm . foo
11
11
12
- const classWrapper = shallow ( ClassComponent )
12
+ const classWrapper = shallowMount ( ClassComponent )
13
13
const classFoo : string = classWrapper . vm . bar
14
14
15
- const functinalWrapper = shallow ( functionalOptions )
15
+ const functinalWrapper = shallowMount ( functionalOptions )
16
16
17
17
/**
18
- * Test for shallow options
18
+ * Test for shallowMount options
19
19
*/
20
20
const localVue = createLocalVue ( )
21
21
localVue . use ( Vuex )
22
22
23
23
const store = new Vuex . Store ( { } )
24
24
25
- shallow ( ClassComponent , {
25
+ shallowMount ( ClassComponent , {
26
26
attachToDocument : true ,
27
27
localVue,
28
28
mocks : {
@@ -41,17 +41,17 @@ shallow(ClassComponent, {
41
41
}
42
42
} )
43
43
44
- shallow ( functionalOptions , {
44
+ shallowMount ( functionalOptions , {
45
45
context : {
46
46
props : { foo : 'test' }
47
47
} ,
48
48
stubs : [ 'child' ]
49
49
} )
50
50
51
51
/**
52
- * ShallowOptions should receive Vue's component options
52
+ * ShallowMountOptions should receive Vue's component options
53
53
*/
54
- shallow ( ClassComponent , {
54
+ shallowMount ( ClassComponent , {
55
55
propsData : {
56
56
test : 'test'
57
57
} ,
0 commit comments