Skip to content

Commit c78d05f

Browse files
author
renkelvin
committed
Use 0 as key if no duration defined
1 parent e2e6e77 commit c78d05f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/auth/test/helpers/timeout_stub.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ export function stubTimeouts(ids?: number[]): TimerMap {
3838
sinon.stub(window, 'setTimeout').callsFake((cb: () => void, duration) => {
3939
if (duration !== undefined) {
4040
callbacks[duration] = cb;
41+
} else {
42+
callbacks[0] = cb;
4143
}
4244
// For some bizarre reason setTimeout always get shoehorned into NodeJS.Timeout,
4345
// which is flat-wrong. This is the easiest way to fix it.

0 commit comments

Comments
 (0)