diff --git a/src/__tests__/auto-cleanup.js b/src/__tests__/auto-cleanup.js index 19a5d082..27debe45 100644 --- a/src/__tests__/auto-cleanup.js +++ b/src/__tests__/auto-cleanup.js @@ -9,5 +9,5 @@ test('first', () => { }) test('second', () => { - expect(document.body).toBeEmpty() + expect(document.body).toBeEmptyDOMElement() }) diff --git a/src/__tests__/cleanup.js b/src/__tests__/cleanup.js index a9a4831f..d1332bf4 100644 --- a/src/__tests__/cleanup.js +++ b/src/__tests__/cleanup.js @@ -18,7 +18,7 @@ test('cleans up the document', async () => { render() await cleanup() - expect(document.body).toBeEmpty() + expect(document.body).toBeEmptyDOMElement() expect(spy).toHaveBeenCalledTimes(1) }) diff --git a/src/__tests__/stopwatch.js b/src/__tests__/stopwatch.js index 882a0888..3fe423b1 100644 --- a/src/__tests__/stopwatch.js +++ b/src/__tests__/stopwatch.js @@ -47,7 +47,7 @@ test('unmounts a component', async () => { // hey there reader! You don't need to have an assertion like this one // this is just me making sure that the unmount function works. // You don't need to do this in your apps. Just rely on the fact that this works. - expect(container).toBeEmpty() + expect(container).toBeEmptyDOMElement() // just wait to see if the interval is cleared or not // if it's not, then we'll call setState on an unmounted component // and get an error.