Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert missing hooks warnings #1255

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading