Skip to content

Commit a72fb39

Browse files
committed
chore: update deps and fix linting
1 parent d10a13d commit a72fb39

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
"react/prop-types": "off",
7070
"react/no-adjacent-inline-elements": "off",
7171
"import/no-unassigned-import": "off",
72-
"import/named": "off"
72+
"import/named": "off",
73+
"testing-library/no-dom-import": "off"
7374
}
7475
},
7576
"eslintIgnore": [

src/__tests__/auto-cleanup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ test('first', () => {
99
})
1010

1111
test('second', () => {
12-
expect(document.body.innerHTML).toEqual('')
12+
expect(document.body).toBeEmpty()
1313
})

src/__tests__/cleanup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test('cleans up the document', async () => {
1818

1919
render(<Test />)
2020
await cleanup()
21-
expect(document.body.innerHTML).toBe('')
21+
expect(document.body).toBeEmpty()
2222
expect(spy).toHaveBeenCalledTimes(1)
2323
})
2424

src/__tests__/debug.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,8 @@ test('allows same arguments as prettyDOM', () => {
4949
`)
5050
})
5151

52-
/* eslint no-console:0 */
52+
/*
53+
eslint
54+
no-console: "off",
55+
testing-library/no-debug: "off",
56+
*/

src/__tests__/multi-base.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,9 @@ test('baseElement isolates trees from one another', () => {
3737
'Unable to find an element with the text: Hyde.',
3838
)
3939
})
40+
41+
// https://github.com/testing-library/eslint-plugin-testing-library/issues/188
42+
/*
43+
eslint
44+
testing-library/prefer-screen-queries: "off",
45+
*/

src/__tests__/stopwatch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ test('unmounts a component', async () => {
4747
// hey there reader! You don't need to have an assertion like this one
4848
// this is just me making sure that the unmount function works.
4949
// You don't need to do this in your apps. Just rely on the fact that this works.
50-
expect(container.innerHTML).toBe('')
50+
expect(container).toBeEmpty()
5151
// just wait to see if the interval is cleared or not
5252
// if it's not, then we'll call setState on an unmounted component
5353
// and get an error.

0 commit comments

Comments
 (0)