We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bf1bba commit 73bbd53Copy full SHA for 73bbd53
src/wait-for.js
@@ -37,13 +37,13 @@ function waitFor(
37
},
38
39
) {
40
- if (typeof callback !== 'function') {
+ if (typeof originalCallback !== 'function') {
41
throw new TypeError('Received `callback` arg must be a function')
42
}
43
44
// callback will be replaced by a noop function as soon as it finishes
45
// to prevent callback leaking calls
46
- let callback = originalCallback;
+ let callback = originalCallback
47
48
return new Promise(async (resolve, reject) => {
49
let lastError, intervalId, observer
@@ -111,7 +111,7 @@ function waitFor(
111
112
function onDone(error, result) {
113
finished = true
114
- callback = () => {};
+ callback = () => {}
115
clearTimeout(overallTimeoutTimer)
116
117
if (!usingJestFakeTimers) {
0 commit comments