mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-04 06:31:35 +08:00
fix(test): wrong assertion after changing expiration interval
This commit is contained in:
parent
5c87bab5a7
commit
a7f4bcda8f
@ -136,7 +136,7 @@ describe("Login Route test", () => {
|
|||||||
expect(session!.cookie.expires).toBeUndefined();
|
expect(session!.cookie.expires).toBeUndefined();
|
||||||
expect(session!.loggedIn).toBe(true);
|
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()).toBeGreaterThan(new Date().getTime());
|
||||||
expect(expiry?.getTime()).toBeLessThanOrEqual(expectedExpirationDate.getTime());
|
expect(expiry?.getTime()).toBeLessThanOrEqual(expectedExpirationDate.getTime());
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user