diff --git a/test/unit/features/directives/on.spec.js b/test/unit/features/directives/on.spec.js index 391cb317..fd65b7eb 100644 --- a/test/unit/features/directives/on.spec.js +++ b/test/unit/features/directives/on.spec.js @@ -86,15 +86,14 @@ describe('Directive v-on', () => { vm = new Vue({ el, template: ` -
-
-
+ `, - methods: { foo: spy, bar: spy2 } + methods: { foo: spy2 } }) - triggerEvent(vm.$el.firstChild, 'click') - expect(spy).toHaveBeenCalled() - expect(spy2).not.toHaveBeenCalled() + vm.$refs.input.checked = false + triggerEvent(vm.$refs.input, 'click') + expect(spy2).toHaveBeenCalled() + expect(vm.$refs.input.checked).toBe(false) }) it('should support capture', () => {