Skip to content

Commit

Permalink
chore: remove deprecated assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Jun 23, 2020
1 parent 6558845 commit 96c79f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/auto-cleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ test('first', () => {
})

test('second', () => {
expect(document.body).toBeEmpty()
expect(document.body).toBeEmptyDOMElement()
})
2 changes: 1 addition & 1 deletion src/__tests__/cleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test('cleans up the document', async () => {

render(<Test />)
await cleanup()
expect(document.body).toBeEmpty()
expect(document.body).toBeEmptyDOMElement()
expect(spy).toHaveBeenCalledTimes(1)
})

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/stopwatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 96c79f8

Please sign in to comment.