Skip to content

Commit f461860

Browse files
committed
Ignore teardown() in code coverage because Jest does not support it
1 parent aa56c11 commit f461860

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import {cleanup} from './pure'
66
// if you don't like this then either import the `pure` module
77
// or set the RTL_SKIP_AUTO_CLEANUP env variable to 'true'.
88
if (!process.env.RTL_SKIP_AUTO_CLEANUP) {
9+
// ignore teardown() in code coverage because Jest does not support it
10+
/* istanbul ignore else */
911
if (typeof afterEach === 'function') {
1012
afterEach(async () => {
1113
await cleanup()

0 commit comments

Comments
 (0)