diff --git a/test/unit/features/directives/bind.spec.js b/test/unit/features/directives/bind.spec.js index b8003158bb..e58802bc89 100644 --- a/test/unit/features/directives/bind.spec.js +++ b/test/unit/features/directives/bind.spec.js @@ -168,20 +168,25 @@ describe('Directive v-bind', () => { it('.sync modifier with kebab case event', done => { const vm = new Vue({ - template: ``, + template: ``, data: { bar: 1 }, components: { test: { props: ['fooBar'], - template: `
{{ fooBar }}
` + template: `
{{ fooBar }}
`, + methods: { + update () { + this.$emit('update:foo-bar', 2) + } + } } } }).$mount() expect(vm.$el.textContent).toBe('1') - triggerEvent(vm.$el, 'click') + vm.$refs.test.update() waitForUpdate(() => { expect(vm.$el.textContent).toBe('2') }).then(done)