diff --git a/test/unit/FormularioForm.test.js b/test/unit/FormularioForm.test.js index 9bd6d97..0c6f3f8 100644 --- a/test/unit/FormularioForm.test.js +++ b/test/unit/FormularioForm.test.js @@ -320,7 +320,7 @@ describe('FormularioForm', () => { expect(wrapper.vm.mergedFieldErrors.inputB.length).toBe(2) }) - it('Emits correct validation event when no errors', async () => { + it('emits correct validation event when no errors', async () => { const wrapper = mount(FormularioForm, { slots: { default: ` @@ -337,11 +337,10 @@ describe('FormularioForm', () => { await flushPromises() expect(wrapper.emitted('validation')).toBeTruthy() - expect(wrapper.emitted('validation').length).toBe(1) - expect(wrapper.emitted('validation')[0][0]).toEqual({ + expect(wrapper.emitted('validation')).toEqual([[{ name: 'foo', violations: [], - }) + }]]) }) it('Emits correct validation event on entry', async () => { diff --git a/test/unit/FormularioInput.test.js b/test/unit/FormularioInput.test.js index 50ca524..77a5d49 100644 --- a/test/unit/FormularioInput.test.js +++ b/test/unit/FormularioInput.test.js @@ -6,7 +6,7 @@ import Formulario from '@/index.ts' import FormularioForm from '@/FormularioForm.vue' import FormularioInput from '@/FormularioInput.vue' -const globalRule = jest.fn(() => { return false }) +const globalRule = jest.fn(() => false) Vue.use(Formulario, { validationRules: { globalRule },