-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
The following test fails
<template>
<button disabled @click="handleClick">Button</button>
</template>
<script>
export default {
methods: {
handleClick() {
console.log('clicked')
},
},
}
</script>
import { shallow } from 'avoriaz'
import { stub } from 'sinon'
import Test from './test'
describe('TEST COMPONENT', () => {
it('should not handle click', () => {
const wrapper = shallow(Test)
wrapper.vm.handleClick = stub()
wrapper.update()
wrapper.first('button').trigger('click')
expect(wrapper.vm.handleClick.called).to.equal(false)
})
})
Metadata
Metadata
Assignees
Labels
No labels