From 96c79f89df82e205f803d69d6b0898d935c0dd37 Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Tue, 23 Jun 2020 15:53:35 -0600 Subject: [PATCH] chore: remove deprecated assertion --- src/__tests__/auto-cleanup.js | 2 +- src/__tests__/cleanup.js | 2 +- src/__tests__/stopwatch.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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.