Skip to content

Commit

Permalink
fix: revert missing hooks warnings (#1255)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatanBobi authored Nov 17, 2023
1 parent fd52a59 commit 1c67477
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ if (typeof process === 'undefined' || !process.env?.RTL_SKIP_AUTO_CLEANUP) {
teardown(() => {
cleanup()
})
} else if (!process.env.RTL_AFTEREACH_WARNING_LOGGED) {
process.env.RTL_AFTEREACH_WARNING_LOGGED = true
console.warn(
`The current test runner does not support afterEach/teardown hooks. This means we won't be able to run automatic cleanup and you should be calling cleanup() manually.`,
)
}

// No test setup with other test runners available
Expand All @@ -40,11 +35,6 @@ if (typeof process === 'undefined' || !process.env?.RTL_SKIP_AUTO_CLEANUP) {
afterAll(() => {
setReactActEnvironment(previousIsReactActEnvironment)
})
} else if (!process.env.RTL_AFTERALL_WARNING_LOGGED) {
process.env.RTL_AFTERALL_WARNING_LOGGED = true
console.warn(
'The current test runner does not support beforeAll/afterAll hooks. This means you should be setting IS_REACT_ACT_ENVIRONMENT manually.',
)
}
}

Expand Down

0 comments on commit 1c67477

Please sign in to comment.