You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add warnings when globals are missing (#1244)
* feat: add warnings when globals are missing
* revert the istanbul ignore removal
* improve error message
* Apply suggestions from code review
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
---------
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
Copy file name to clipboardexpand all lines: src/index.js
+8
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,10 @@ if (typeof process === 'undefined' || !process.env?.RTL_SKIP_AUTO_CLEANUP) {
20
20
teardown(()=>{
21
21
cleanup()
22
22
})
23
+
}else{
24
+
console.warn(
25
+
`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.`,
26
+
)
23
27
}
24
28
25
29
// No test setup with other test runners available
@@ -35,6 +39,10 @@ if (typeof process === 'undefined' || !process.env?.RTL_SKIP_AUTO_CLEANUP) {
0 commit comments