We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 303824e commit 2e1e809Copy full SHA for 2e1e809
test/unit/features/directives/on.spec.js
@@ -86,15 +86,14 @@ describe('Directive v-on', () => {
86
vm = new Vue({
87
el,
88
template: `
89
- <div @click="bar">
90
- <div @click.stop="foo"></div>
91
- </div>
+ <input type="checkbox" ref="input" @click.prevent="foo">
92
`,
93
- methods: { foo: spy, bar: spy2 }
+ methods: { foo: spy2 }
94
})
95
- triggerEvent(vm.$el.firstChild, 'click')
96
- expect(spy).toHaveBeenCalled()
97
- expect(spy2).not.toHaveBeenCalled()
+ vm.$refs.input.checked = false
+ triggerEvent(vm.$refs.input, 'click')
+ expect(spy2).toHaveBeenCalled()
+ expect(vm.$refs.input.checked).toBe(false)
98
99
100
it('should support capture', () => {
0 commit comments