diff --git a/tests/unit/composables/useKeyboard.spec.js b/tests/unit/composables/useKeyboard.spec.js index 68bc2d3..0c680b5 100644 --- a/tests/unit/composables/useKeyboard.spec.js +++ b/tests/unit/composables/useKeyboard.spec.js @@ -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',