diff --git a/package.json b/package.json index bdf6fd23..5a25d653 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "is-ci": "^2.0.0", "jest-in-case": "^1.0.2", "jest-serializer-ansi": "^1.0.3", - "kcd-scripts": "^7.5.1", + "kcd-scripts": "^11.1.0", "react": "^17.0.2", "react-dom": "^17.0.2", "typescript": "^4.1.2" diff --git a/src/__tests__/clear.js b/src/__tests__/clear.js index c237f074..3cdb2c47 100644 --- a/src/__tests__/clear.js +++ b/src/__tests__/clear.js @@ -89,6 +89,6 @@ test('non-inputs/textareas are currently unsupported', () => { const {element} = setup('
') expect(() => userEvent.clear(element)).toThrowErrorMatchingInlineSnapshot( - `"clear currently only supports input and textarea elements."`, + `clear currently only supports input and textarea elements.`, ) }) diff --git a/src/__tests__/helpers/utils.js b/src/__tests__/helpers/utils.js index 7a18fd4a..36a4e474 100644 --- a/src/__tests__/helpers/utils.js +++ b/src/__tests__/helpers/utils.js @@ -1,3 +1,4 @@ +/* eslint-disable testing-library/no-node-access */ import {eventMap} from '@testing-library/dom/dist/event-map' import {isElementType} from '../../utils' // this is pretty helpful: diff --git a/src/__tests__/hover.js b/src/__tests__/hover.js index 8cd7029c..710803e0 100644 --- a/src/__tests__/hover.js +++ b/src/__tests__/hover.js @@ -70,15 +70,15 @@ test('fires non-bubbling events on parents for hover', () => { userEvent.hover(button) expect(calls.join('\n')).toMatchInlineSnapshot(` - "BUTTON: pointerover - DIV: pointerover - DIV: pointerenter - BUTTON: pointerenter - BUTTON: mouseover - DIV: mouseover - DIV: mouseenter - BUTTON: mouseenter" - `) +BUTTON: pointerover +DIV: pointerover +DIV: pointerenter +BUTTON: pointerenter +BUTTON: mouseover +DIV: mouseover +DIV: mouseenter +BUTTON: mouseenter +`) }) test('fires non-bubbling events on parents for unhover', () => { @@ -112,15 +112,15 @@ test('fires non-bubbling events on parents for unhover', () => { userEvent.unhover(button) expect(calls.join('\n')).toMatchInlineSnapshot(` - "BUTTON: pointerout - DIV: pointerout - BUTTON: pointerleave - DIV: pointerleave - BUTTON: mouseout - DIV: mouseout - BUTTON: mouseleave - DIV: mouseleave" - `) +BUTTON: pointerout +DIV: pointerout +BUTTON: pointerleave +DIV: pointerleave +BUTTON: mouseout +DIV: mouseout +BUTTON: mouseleave +DIV: mouseleave +`) }) test('throws when hovering element with pointer-events set to none', () => { diff --git a/src/__tests__/paste.js b/src/__tests__/paste.js index 7427c165..22ab1e3d 100644 --- a/src/__tests__/paste.js +++ b/src/__tests__/paste.js @@ -102,7 +102,7 @@ test('should give error if we are trying to call paste on an invalid element', ( const {element} = setup('
') expect(() => userEvent.paste(element, "I'm only a div :(")) .toThrowErrorMatchingInlineSnapshot(` - "The given DIV element is currently unsupported. - A PR extending this implementation would be very much welcome at https://github.com/testing-library/user-event" + The given DIV element is currently unsupported. + A PR extending this implementation would be very much welcome at https://github.com/testing-library/user-event `) }) diff --git a/src/__tests__/type.js b/src/__tests__/type.js index d1d72207..b91f436b 100644 --- a/src/__tests__/type.js +++ b/src/__tests__/type.js @@ -232,6 +232,7 @@ test('should delay the typing when opts.delay is not 0', async () => { const text = 'Hello, world!' const delay = 10 + // eslint-disable-next-line testing-library/no-await-sync-events await userEvent.type(element, text, {delay}) expect(onInput).toHaveBeenCalledTimes(text.length) diff --git a/src/__tests__/upload.js b/src/__tests__/upload.js index 37640cf3..801e6622 100644 --- a/src/__tests__/upload.js +++ b/src/__tests__/upload.js @@ -242,13 +242,13 @@ test('throw error if trying to use upload on an invalid element', () => { expect(() => userEvent.upload(elements[0], "I'm only a div :("), ).toThrowErrorMatchingInlineSnapshot( - `"The given DIV element does not accept file uploads"`, + `The given DIV element does not accept file uploads`, ) expect(() => userEvent.upload(elements[1], "I'm a checkbox :("), ).toThrowErrorMatchingInlineSnapshot( - `"The associated INPUT element does not accept file uploads"`, + `The associated INPUT element does not accept file uploads`, ) }) diff --git a/src/__tests__/utils.js b/src/__tests__/utils.js index b97c814c..a15a2f07 100644 --- a/src/__tests__/utils.js +++ b/src/__tests__/utils.js @@ -1,3 +1,4 @@ +/* eslint-disable testing-library/no-node-access */ import {screen} from '@testing-library/dom' import {isElementType, isVisible} from '../utils' import {setup} from './helpers/utils'