import Vue from 'vue' import { mount, shallowMount } from '@vue/test-utils' import flushPromises from 'flush-promises' import Formulate from '../src/Formulate.js' import FormulateForm from '@/FormulateForm.vue' import FormulateInput from '@/FormulateInput.vue' Vue.use(Formulate) describe('FormulateForm', () => { it('render a form DOM element', () => { const wrapper = mount(FormulateForm) expect(wrapper.find('form').exists()).toBe(true) }) it('accepts a default slot', () => { const wrapper = mount(FormulateForm, { slots: { default: '
' } }) expect(wrapper.find('form div.default-slot-item').exists()).toBe(true) }) it('intercepts submit event', () => { const formSubmitted = jest.fn() const wrapper = mount(FormulateForm, { slots: { default: "