1
1
import Table from './table'
2
- import { mount , TransitionGroupStub } from '@vue/test-utils'
2
+ import { mount } from '@vue/test-utils'
3
3
4
4
const testItems = [ { a : 1 , b : 2 , c : 3 } , { a : 5 , b : 5 , c : 6 } , { a : 7 , b : 8 , c : 9 } ]
5
5
const testFields = [ 'a' , 'b' , 'c' ]
@@ -10,7 +10,12 @@ describe('table body transition', () => {
10
10
propsData : {
11
11
fields : testFields ,
12
12
items : testItems
13
- }
13
+ } ,
14
+ stubs : {
15
+ // the builtin stub doesn't really emulate transitio properly
16
+ // so we let it use the real transition component
17
+ 'transition-group' : false
18
+ }
14
19
} )
15
20
expect ( wrapper ) . toBeDefined ( )
16
21
expect ( wrapper . is ( 'table' ) ) . toBe ( true )
@@ -29,8 +34,10 @@ describe('table body transition', () => {
29
34
}
30
35
} ,
31
36
stubs : {
32
- 'transition-group' : TransitionGroupStub
33
- }
37
+ // the builtin stub doesn't really emulate transitio properly
38
+ // so we let it use the real transition component
39
+ 'transition-group' : false
40
+ }
34
41
} )
35
42
expect ( wrapper ) . toBeDefined ( )
36
43
expect ( wrapper . is ( 'table' ) ) . toBe ( true )
@@ -50,7 +57,12 @@ describe('table body transition', () => {
50
57
onBeforeLeave : el => { } ,
51
58
onAfterLeave : el => { }
52
59
}
53
- }
60
+ } ,
61
+ stubs : {
62
+ // the builtin stub doesn't really emulate transitio properly
63
+ // so we let it use the real transition component
64
+ 'transition-group' : false
65
+ }
54
66
} )
55
67
expect ( wrapper ) . toBeDefined ( )
56
68
expect ( wrapper . is ( 'table' ) ) . toBe ( true )
0 commit comments