Skip to content

Commit 9ea0e3b

Browse files
authored
[Auth] Reproduce CI test compilation error. (#7966)
Update Auth's timeout stub to handle undefined duration. This fixes an build error in Auth CI.
1 parent 434f841 commit 9ea0e3b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/auth/test/helpers/timeout_stub.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ export function stubTimeouts(ids?: number[]): TimerMap {
3636
let idCounter = 0;
3737

3838
sinon.stub(window, 'setTimeout').callsFake((cb: () => void, duration) => {
39-
callbacks[duration] = cb;
39+
if (duration !== undefined) {
40+
callbacks[duration] = cb;
41+
} else {
42+
callbacks[0] = cb;
43+
}
4044
// For some bizarre reason setTimeout always get shoehorned into NodeJS.Timeout,
4145
// which is flat-wrong. This is the easiest way to fix it.
4246
// eslint-disable-next-line @typescript-eslint/no-explicit-any

0 commit comments

Comments
 (0)