diff --git a/src/__tests__/type-modifiers.js b/src/__tests__/type-modifiers.js index f398ea99f..be1b3deed 100644 --- a/src/__tests__/type-modifiers.js +++ b/src/__tests__/type-modifiers.js @@ -117,6 +117,14 @@ test('{backspace} deletes the selected range', async () => { `) }) +test('{backspace} on an input type that does not support selection ranges', async () => { + const {element} = setup() + // note: you cannot even call setSelectionRange on these kinds of elements... + await userEvent.type(element, '{backspace}') + // removed "m" + expect(element).toHaveValue('yo@example.co') +}) + test('{alt}a{/alt}', async () => { const {element: input, getEventCalls} = setup()