Skip to content

Commit

Permalink
test(radio): update test (#1612)
Browse files Browse the repository at this point in the history
  • Loading branch information
XieZongChen authored Nov 18, 2021
1 parent 0acdcaa commit 7da5b0e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/radio/tests/Radio.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ describe('n-radio', () => {
expect(wrapper.find('.n-radio').attributes('style')).toMatchSnapshot()
})
})

it('should work with `onUpdate:checked` prop', async () => {
const onUpdate = jest.fn()
const wrapper = mount(NRadio, { props: { 'onUpdate:checked': onUpdate } })

await wrapper.find('.n-radio').trigger('click')
setTimeout(() => {
expect(onUpdate).toHaveBeenCalled()
}, 0)
})
})

describe('n-radio-group', () => {
Expand Down

0 comments on commit 7da5b0e

Please sign in to comment.