@@ -9,21 +9,21 @@ import ComponentWithNestedChildren from '~resources/components/component-with-ne
9
9
import ComponentWithLifecycleHooks from '~resources/components/component-with-lifecycle-hooks.vue'
10
10
11
11
describe ( 'shallow' , ( ) => {
12
- it ( 'returns new VueWrapper of Vue instance if no options are passed' , ( ) => {
12
+ it ( 'returns new VueWrapper of Vue localVue if no options are passed' , ( ) => {
13
13
const compiled = compileToFunctions ( '<div><input /></div>' )
14
14
const wrapper = shallow ( compiled )
15
15
expect ( wrapper ) . to . be . instanceOf ( VueWrapper )
16
16
expect ( wrapper . vm ) . to . be . an ( 'object' )
17
17
} )
18
18
19
- it ( 'returns new VueWrapper of Vue instance with all children stubbed' , ( ) => {
19
+ it ( 'returns new VueWrapper of Vue localVue with all children stubbed' , ( ) => {
20
20
const wrapper = shallow ( ComponentWithNestedChildren )
21
21
expect ( wrapper ) . to . be . instanceOf ( VueWrapper )
22
22
expect ( wrapper . findAll ( Component ) . length ) . to . equal ( 0 )
23
23
expect ( wrapper . findAll ( ComponentWithChildComponent ) . length ) . to . equal ( 1 )
24
24
} )
25
25
26
- it ( 'returns new VueWrapper of Vue instance with all children stubbed' , ( ) => {
26
+ it ( 'returns new VueWrapper of Vue localVue with all children stubbed' , ( ) => {
27
27
const wrapper = shallow ( ComponentWithNestedChildren )
28
28
expect ( wrapper ) . to . be . instanceOf ( VueWrapper )
29
29
expect ( wrapper . findAll ( Component ) . length ) . to . equal ( 0 )
@@ -37,15 +37,15 @@ describe('shallow', () => {
37
37
expect ( mountedWrapper . findAll ( Component ) . length ) . to . equal ( 1 )
38
38
} )
39
39
40
- it ( 'stubs globally registered components when options.instance is provided' , ( ) => {
41
- const freshVue = Vue . extend ( )
40
+ it ( 'stubs globally registered components when options.localVue is provided' , ( ) => {
41
+ const localVue = Vue . extend ( )
42
42
const log = sinon . stub ( console , 'log' )
43
- freshVue . component ( 'registered-component' , ComponentWithLifecycleHooks )
43
+ localVue . component ( 'registered-component' , ComponentWithLifecycleHooks )
44
44
const Component = {
45
45
render : h => h ( 'registered-component' )
46
46
}
47
- shallow ( Component , { instance : freshVue } )
48
- mount ( Component , { instance : freshVue } )
47
+ shallow ( Component , { localVue } )
48
+ mount ( Component , { localVue } )
49
49
50
50
expect ( log . callCount ) . to . equal ( 4 )
51
51
log . restore ( )
0 commit comments