Skip to content

Commit 220d8d4

Browse files
authored
fix(cleanup): remove unnecessary async/await (#778)
1 parent 20acad3 commit 220d8d4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ if (!process.env.RTL_SKIP_AUTO_CLEANUP) {
99
// ignore teardown() in code coverage because Jest does not support it
1010
/* istanbul ignore else */
1111
if (typeof afterEach === 'function') {
12-
afterEach(async () => {
13-
await cleanup()
12+
afterEach(() => {
13+
cleanup()
1414
})
1515
} else if (typeof teardown === 'function') {
1616
// Block is guarded by `typeof` check.
1717
// eslint does not support `typeof` guards.
1818
// eslint-disable-next-line no-undef
19-
teardown(async () => {
20-
await cleanup()
19+
teardown(() => {
20+
cleanup()
2121
})
2222
}
2323
}

0 commit comments

Comments
 (0)