Open goooseman opened 1 year ago
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch wait-for-expect@3.0.2 for the project I'm working on.
wait-for-expect@3.0.2
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.
+1 I am also having this issue
Any updates on this item? It's been over a year :(
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
wait-for-expect@3.0.2
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.