Skip to content

Commit 35efd2a

Browse files
committed
test(server): broken test due to CLS
1 parent 19c6ae6 commit 35efd2a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/server/src/routes/login.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { Application } from "express";
44
import dayjs from "dayjs";
55
import { type SQLiteSessionStore } from "./session_parser.js";
66
import { SessionData } from "express-session";
7+
import cls from "../services/cls.js";
78

89
let app: Application;
910
let sessionStore: SQLiteSessionStore;
@@ -106,7 +107,7 @@ describe("Login Route test", () => {
106107
expect(expiry).toBeTruthy();
107108

108109
vi.setSystemTime(expiry!);
109-
vi.advanceTimersByTime(CLEAN_UP_INTERVAL);
110+
cls.init(() => vi.advanceTimersByTime(CLEAN_UP_INTERVAL));
110111
({ session } = await getSessionFromCookie(setCookieHeader));
111112
expect(session).toBeFalsy();
112113
});

0 commit comments

Comments
 (0)