Skip to content

Commit

Permalink
Ignore teardown() in code coverage because Jest does not support it
Browse files Browse the repository at this point in the history
  • Loading branch information
screendriver committed Jun 4, 2020
1 parent aa56c11 commit f461860
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.js
Expand Up @@ -6,6 +6,8 @@ import {cleanup} from './pure'
// if you don't like this then either import the `pure` module
// or set the RTL_SKIP_AUTO_CLEANUP env variable to 'true'.
if (!process.env.RTL_SKIP_AUTO_CLEANUP) {
// ignore teardown() in code coverage because Jest does not support it
/* istanbul ignore else */
if (typeof afterEach === 'function') {
afterEach(async () => {
await cleanup()
Expand Down

0 comments on commit f461860

Please sign in to comment.