diff --git a/src/index.js b/src/index.js index b69f6555..4f92e02b 100644 --- a/src/index.js +++ b/src/index.js @@ -9,15 +9,15 @@ 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() + afterEach(() => { + cleanup() }) } else if (typeof teardown === 'function') { // Block is guarded by `typeof` check. // eslint does not support `typeof` guards. // eslint-disable-next-line no-undef - teardown(async () => { - await cleanup() + teardown(() => { + cleanup() }) } }