Skip to content

Commit c823f65

Browse files
authored
Update table-tbody-transition.spec.js
1 parent b5466fc commit c823f65

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

src/components/table/table-tbody-transition.spec.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Table from './table'
2-
import { mount, TransitionGroupStub } from '@vue/test-utils'
2+
import { mount } from '@vue/test-utils'
33

44
const testItems = [{ a: 1, b: 2, c: 3 }, { a: 5, b: 5, c: 6 }, { a: 7, b: 8, c: 9 }]
55
const testFields = ['a', 'b', 'c']
@@ -10,7 +10,12 @@ describe('table body transition', () => {
1010
propsData: {
1111
fields: testFields,
1212
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+
}
1419
})
1520
expect(wrapper).toBeDefined()
1621
expect(wrapper.is('table')).toBe(true)
@@ -29,8 +34,10 @@ describe('table body transition', () => {
2934
}
3035
},
3136
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+
}
3441
})
3542
expect(wrapper).toBeDefined()
3643
expect(wrapper.is('table')).toBe(true)
@@ -50,7 +57,12 @@ describe('table body transition', () => {
5057
onBeforeLeave: el => {},
5158
onAfterLeave: el => {}
5259
}
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+
}
5466
})
5567
expect(wrapper).toBeDefined()
5668
expect(wrapper.is('table')).toBe(true)

0 commit comments

Comments
 (0)