-
Notifications
You must be signed in to change notification settings - Fork 470
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: Guard against jest.useRealTimers
not existing
#934
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 80a6af8:
|
Codecov Report
@@ Coverage Diff @@
## master #934 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 26 26
Lines 948 953 +5
Branches 284 289 +5
=========================================
+ Hits 948 953 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just one potential ReferenceError slipped through I think.
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified this change actually fixes #905 with
diff --git a/package.json b/package.json
index 76ba73e..8ab24e3 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
"license": "Apache License, Version 2.0",
"type": "module",
"dependencies": {
- "@tmtsoftware/esw-ts": "git+https://github.com/tmtsoftware/esw-ts#2a03d094a7439b4f21bd262c10f13d9f2ef76033",
+ "@tmtsoftware/esw-ts": "https://github.com/eps1lon/esw-ts#fad5e14e22ab4e6019bf8a1012906044ec36aa7e",
"antd": "^4.13.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
@@ -66,5 +66,8 @@
"stylelint-config-standard": "^21.0.0",
"ts-mockito": "^2.6.1",
"typescript": "^4.2.3"
+ },
+ "resolutions": {
+ "**/@testing-library/dom": "https://pkg.csb.dev/testing-library/dom-testing-library/commit/80a6af82/@testing-library/dom"
}
}
jest.useRealTimers
existsjest.useRealTimers
not existing
🎉 This PR is included in version 7.30.4 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What:
Check if
jest.useRealTimers
is a function before calling it.Closes #905
Why:
In some environments (e.g. codesandbox)
jest
exists but is eithernull
or theuseRealTimers
anduseFakeTimers
don't exist.Checklist:
docs site