Skip to content

Commit 96c79f8

Browse files
committed
chore: remove deprecated assertion
1 parent 6558845 commit 96c79f8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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).toBeEmpty()
12+
expect(document.body).toBeEmptyDOMElement()
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).toBeEmpty()
21+
expect(document.body).toBeEmptyDOMElement()
2222
expect(spy).toHaveBeenCalledTimes(1)
2323
})
2424

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).toBeEmpty()
50+
expect(container).toBeEmptyDOMElement()
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)