Skip to content

Commit

Permalink
test: IME enter test
Browse files Browse the repository at this point in the history
  • Loading branch information
adamberecz committed Nov 18, 2022
1 parent c7f0b5a commit 3133d50
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/unit/composables/useKeyboard.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,23 @@ describe('useKeyboard', () => {
expect(preventMock).toHaveBeenCalled()
})

it('should prevent on IME enter', async () => {
let select = createSelect({
value: 1,
options: [1,2,3],
})

let preventMock = jest.fn()

select.vm.handleKeydown({
preventDefault: preventMock,
key: 'Enter',
keyCode: 229
})

expect(preventMock).toHaveBeenCalled()
})

it('should remove last tag if focused on enter', async () => {
let select = createSelect({
mode: 'tags',
Expand Down

0 comments on commit 3133d50

Please sign in to comment.