import Vue from 'vue' import { mount } from '@vue/test-utils' import flushPromises from 'flush-promises' import Formulario from '@/index.ts' import FormularioForm from '@/FormularioForm.vue' Vue.use(Formulario, { messages: { required: () => 'required', 'in': () => 'in', min: () => 'min', } }) describe('FormularioForm', () => { it('render a form DOM element', () => { const wrapper = mount(FormularioForm) expect(wrapper.find('form').exists()).toBe(true) }) it('accepts a default slot', () => { const wrapper = mount(FormularioForm, { slots: { default: '
' } }) expect(wrapper.find('form div.default-slot-item').exists()).toBe(true) }) it('Intercepts submit event', () => { const wrapper = mount(FormularioForm, { slots: { default: '