Utilisation
import Vue from 'vue';
import {
Wrapper,
shallowMount,
createLocalVue,
installGlobalPlugins,
mockVFormRef
} from '@cnamts/vue-dot/src/helpers/testUtils';
describe('Component', () => {
const localVue = createLocalVue();
let wrapper: Wrapper<Vue>;
installGlobalPlugins(localVue);
it('submits form', () => {
const mocks = {
$refs: {
form: mockVFormRef(true)
}
};
wrapper = shallowMount(Component, {
localVue,
mocks
});
expect(wrapper).toMatchSnapshot();
});
});