test/user-journey #3

Merged
zhangxiang merged 142 commits from test/user-journey into dev 2026-04-12 13:17:03 +08:00
2 changed files with 7 additions and 4 deletions
Showing only changes of commit 9c6a905788 - Show all commits
+1
View File
@@ -8,6 +8,7 @@ module.exports = {
'!src/**/*.d.ts',
'!src/**/*.stories.{ts,tsx}',
'!src/**/__tests__/**',
'!src/db/seed*.ts',
],
coverageThreshold: {
global: {
+6 -4
View File
@@ -9,10 +9,11 @@ export interface Session extends SessionData {
}
export function createSession(userData: SessionData): Session {
const now = Date.now();
return {
...userData,
createdAt: Date.now(),
expiresAt: Date.now() + (24 * 60 * 60 * 1000),
createdAt: now,
expiresAt: now + (24 * 60 * 60 * 1000),
};
}
@@ -33,9 +34,10 @@ export function isSessionExpired(session: Session): boolean {
}
export function createSessionWithCustomExpiration(userData: SessionData, expiresInMs: number): Session {
const now = Date.now();
return {
...userData,
createdAt: Date.now(),
expiresAt: Date.now() + expiresInMs,
createdAt: now,
expiresAt: now + expiresInMs,
};
}