Open
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected]
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/wait-for-expect/lib/helpers.js b/node_modules/wait-for-expect/lib/helpers.js
index 27d63b7..aee6aa4 100644
--- a/node_modules/wait-for-expect/lib/helpers.js
+++ b/node_modules/wait-for-expect/lib/helpers.js
@@ -15,7 +15,9 @@ var globalObj = typeof window === "undefined" ? global : window; // Currently th
function runWithRealTimers(callback) {
var usingJestFakeTimers = // eslint-disable-next-line no-underscore-dangle
- globalObj.setTimeout._isMockFunction && typeof jest !== "undefined";
+ typeof jest !== 'undefined' &&
+ setTimeout.clock != null &&
+ typeof setTimeout.clock.Date === 'function';
if (usingJestFakeTimers) {
jest.useRealTimers();
This issue body was partially generated by patch-package.
Metadata
Metadata
Assignees
Labels
No labels