We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 434f841 commit 9ea0e3bCopy full SHA for 9ea0e3b
packages/auth/test/helpers/timeout_stub.ts
@@ -36,7 +36,11 @@ export function stubTimeouts(ids?: number[]): TimerMap {
36
let idCounter = 0;
37
38
sinon.stub(window, 'setTimeout').callsFake((cb: () => void, duration) => {
39
- callbacks[duration] = cb;
+ if (duration !== undefined) {
40
+ callbacks[duration] = cb;
41
+ } else {
42
+ callbacks[0] = cb;
43
+ }
44
// For some bizarre reason setTimeout always get shoehorned into NodeJS.Timeout,
45
// which is flat-wrong. This is the easiest way to fix it.
46
// eslint-disable-next-line @typescript-eslint/no-explicit-any
0 commit comments