import { mount, later } from '../../../test';
// this case will throw wierd error in index.spec.js
// so separate it
test('insert tab dynamically', async () => {
const wrapper = mount({
template: `
1
2
3
`,
data() {
return {
insert: false,
active: 1,
};
},
});
await later();
wrapper.setData({ insert: true });
expect(wrapper).toMatchSnapshot();
});
// this case will throw wierd error in index.spec.js
// so separate it
test('insert tab with child component', async () => {
const wrapper = mount({
template: `
1
3
`,
components: {
'my-tab': {
template: `2`,
},
},
});
await later();
expect(wrapper).toMatchSnapshot();
});