diff --git a/packages/test-utils/src/config.js b/packages/test-utils/src/config.js index e70ea7c20..dca576c28 100644 --- a/packages/test-utils/src/config.js +++ b/packages/test-utils/src/config.js @@ -1,5 +1,8 @@ export default { - stubs: {}, + stubs: { + transition: true, + 'transition-group': true + }, mocks: {}, methods: {}, provide: {}, diff --git a/test/resources/components/component-with-transitions.vue b/test/resources/components/component-with-transitions.vue new file mode 100644 index 000000000..9af326ce4 --- /dev/null +++ b/test/resources/components/component-with-transitions.vue @@ -0,0 +1,20 @@ + + + diff --git a/test/specs/config.spec.js b/test/specs/config.spec.js index 660aafabc..3f44751a1 100644 --- a/test/specs/config.spec.js +++ b/test/specs/config.spec.js @@ -1,6 +1,7 @@ import { describeWithShallowAndMount } from '~resources/utils' import ComponentWithProps from '~resources/components/component-with-props.vue' import { config, createLocalVue } from '@vue/test-utils' +import ComponentWithTransitions from '~resources/components/component-with-transitions.vue' describeWithShallowAndMount('config', mountingMethod => { const sandbox = sinon.createSandbox() @@ -90,4 +91,12 @@ describeWithShallowAndMount('config', mountingMethod => { }) expect(console.error).calledWith(sandbox.match('[Vue warn]')) }) + + it('stubs out transitions by default', async () => { + const wrapper = mountingMethod(ComponentWithTransitions) + expect(wrapper.find('[data-testid="expanded"]').exists()).to.equal(true) + wrapper.setData({ expanded: true }) + await wrapper.vm.$nextTick() + expect(wrapper.find('[data-testid="expanded"]').exists()).to.equal(false) + }) })