This commit is contained in:
2025-12-12 23:49:56 +01:00
parent cae81b1088
commit 8f1db21fb1
29 changed files with 879 additions and 399 deletions

View File

@@ -35,7 +35,9 @@ describe('iRacing auth route handlers', () => {
expect(location).toMatch(/state=/);
expect(cookieStore.set).toHaveBeenCalled();
const [name] = cookieStore.set.mock.calls[0];
const call = cookieStore.set.mock.calls[0];
expect(call).toBeDefined();
const [name] = call as [string, string];
expect(name).toBe('gp_demo_auth_state');
});
@@ -58,7 +60,9 @@ describe('iRacing auth route handlers', () => {
expect(location).toBe('http://localhost/dashboard');
expect(cookieStore.set).toHaveBeenCalled();
const [sessionName, sessionValue] = cookieStore.set.mock.calls[0];
const call = cookieStore.set.mock.calls[0];
expect(call).toBeDefined();
const [sessionName, sessionValue] = call as [string, string];
expect(sessionName).toBe('gp_demo_session');
expect(typeof sessionValue).toBe('string');