Skip to content

Commit 1934bf2

Browse files
authored
Bump kcd-scripts to 13.0.0 (#1170)
* Bump kcd-scripts to 13.0.0 * Resolve lint issues
1 parent 9b7a1e2 commit 1934bf2

File tree

8 files changed

+18
-12
lines changed

8 files changed

+18
-12
lines changed

package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
"@testing-library/jest-dom": "^5.11.6",
5454
"chalk": "^4.1.2",
5555
"dotenv-cli": "^4.0.0",
56-
"jest-diff": "^27.5.1",
57-
"kcd-scripts": "^11.1.0",
56+
"jest-diff": "^29.4.1",
57+
"kcd-scripts": "^13.0.0",
5858
"npm-run-all": "^4.1.5",
5959
"react": "^18.0.0",
6060
"react-dom": "^18.0.0",
@@ -67,6 +67,9 @@
6767
},
6868
"eslintConfig": {
6969
"extends": "./node_modules/kcd-scripts/eslint.js",
70+
"parserOptions": {
71+
"ecmaVersion": 2022
72+
},
7073
"globals": {
7174
"globalThis": "readonly"
7275
},
@@ -76,6 +79,7 @@
7679
"import/no-unassigned-import": "off",
7780
"import/named": "off",
7881
"testing-library/no-container": "off",
82+
"testing-library/no-debugging-utils": "off",
7983
"testing-library/no-dom-import": "off",
8084
"testing-library/no-unnecessary-act": "off",
8185
"testing-library/prefer-user-event": "off"

src/__tests__/cleanup.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('fake timers and missing act warnings', () => {
6464
let cancelled = false
6565
Promise.resolve().then(() => {
6666
microTaskSpy()
67-
// eslint-disable-next-line jest/no-if -- false positive
67+
// eslint-disable-next-line jest/no-if, jest/no-conditional-in-test -- false positive
6868
if (!cancelled) {
6969
setDeferredCounter(counter)
7070
}
@@ -96,6 +96,7 @@ describe('fake timers and missing act warnings', () => {
9696
let cancelled = false
9797
setTimeout(() => {
9898
deferredStateUpdateSpy()
99+
// eslint-disable-next-line jest/no-conditional-in-test -- false-positive
99100
if (!cancelled) {
100101
setDeferredCounter(counter)
101102
}

src/__tests__/debug.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ test('allows same arguments as prettyDOM', () => {
4242
debug(container, 6, {highlight: false})
4343
expect(console.log).toHaveBeenCalledTimes(1)
4444
expect(console.log.mock.calls[0]).toMatchInlineSnapshot(`
45-
Array [
45+
[
4646
<div>
4747
...,
4848
]
@@ -52,5 +52,4 @@ test('allows same arguments as prettyDOM', () => {
5252
/*
5353
eslint
5454
no-console: "off",
55-
testing-library/no-debug: "off",
5655
*/

src/__tests__/new-act.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ test('async act recovers from errors', async () => {
4747
}
4848
expect(console.error).toHaveBeenCalledTimes(1)
4949
expect(console.error.mock.calls).toMatchInlineSnapshot(`
50-
Array [
51-
Array [
50+
[
51+
[
5252
call console.error,
5353
],
5454
]
@@ -65,8 +65,8 @@ test('async act recovers from sync errors', async () => {
6565
}
6666
expect(console.error).toHaveBeenCalledTimes(1)
6767
expect(console.error.mock.calls).toMatchInlineSnapshot(`
68-
Array [
69-
Array [
68+
[
69+
[
7070
call console.error,
7171
],
7272
]

src/__tests__/renderHook.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ test('allows rerendering', () => {
2121
const [left, setLeft] = React.useState('left')
2222
const [right, setRight] = React.useState('right')
2323

24-
// eslint-disable-next-line jest/no-if
24+
// eslint-disable-next-line jest/no-if, jest/no-conditional-in-test -- false-positive
2525
switch (branch) {
2626
case 'left':
2727
return [left, setLeft]

tests/setup-env.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
import '@testing-library/jest-dom/extend-expect'
22
import './failOnUnexpectedConsoleCalls'
3+
import {TextEncoder} from 'util'
4+
5+
global.TextEncoder = TextEncoder

tests/toWarnDev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SOFTWARE.
2424
*/
2525
/* eslint-disable no-unsafe-finally */
2626
/* eslint-disable no-negated-condition */
27-
/* eslint-disable @babel/no-invalid-this */
27+
/* eslint-disable no-invalid-this */
2828
/* eslint-disable prefer-template */
2929
/* eslint-disable func-names */
3030
/* eslint-disable complexity */

types/test.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ export function testRenderHookProps() {
188188
eslint
189189
testing-library/prefer-explicit-assert: "off",
190190
testing-library/no-wait-for-empty-callback: "off",
191-
testing-library/no-debug: "off",
192191
testing-library/prefer-screen-queries: "off"
193192
*/
194193

0 commit comments

Comments
 (0)