fix(test): wrong assertion after changing expiration interval

This commit is contained in:
Elian Doran 2025-06-07 11:38:18 +03:00
parent 5c87bab5a7
commit a7f4bcda8f
No known key found for this signature in database

View File

@ -136,7 +136,7 @@ describe("Login Route test", () => {
expect(session!.cookie.expires).toBeUndefined();
expect(session!.loggedIn).toBe(true);
const expectedExpirationDate = dayjs().utc().add(1, "hour").toDate();
const expectedExpirationDate = dayjs().utc().add(1, "day").toDate();
expect(expiry?.getTime()).toBeGreaterThan(new Date().getTime());
expect(expiry?.getTime()).toBeLessThanOrEqual(expectedExpirationDate.getTime());
});