This commit is contained in:
2025-11-30 23:00:48 +01:00
parent 4b8c70978f
commit 645f537895
41 changed files with 738 additions and 1631 deletions

View File

@@ -60,7 +60,7 @@ describe('SessionCookieStore - Cookie Validation', () => {
const result = cookieStore.validateCookieConfiguration(targetUrl);
expect(result.isErr()).toBe(true);
expect(result.unwrapErr()).toMatch(/domain mismatch/i);
expect(result.unwrapErr().message).toMatch(/domain mismatch/i);
});
test('should fail when cookie path is invalid for target', async () => {
@@ -81,7 +81,7 @@ describe('SessionCookieStore - Cookie Validation', () => {
const result = cookieStore.validateCookieConfiguration(targetUrl);
expect(result.isErr()).toBe(true);
expect(result.unwrapErr()).toMatch(/path.*not valid/i);
expect(result.unwrapErr().message).toMatch(/path.*not valid/i);
});
test('should fail when required irsso_members cookie is missing', async () => {
@@ -102,7 +102,7 @@ describe('SessionCookieStore - Cookie Validation', () => {
const result = cookieStore.validateCookieConfiguration(targetUrl);
expect(result.isErr()).toBe(true);
expect(result.unwrapErr()).toMatch(/required.*irsso_members/i);
expect(result.unwrapErr().message).toMatch(/required.*irsso_members/i);
});
test('should fail when required authtoken_members cookie is missing', async () => {
@@ -123,14 +123,14 @@ describe('SessionCookieStore - Cookie Validation', () => {
const result = cookieStore.validateCookieConfiguration(targetUrl);
expect(result.isErr()).toBe(true);
expect(result.unwrapErr()).toMatch(/required.*authtoken_members/i);
expect(result.unwrapErr().message).toMatch(/required.*authtoken_members/i);
});
test('should fail when no cookies are stored', () => {
const result = cookieStore.validateCookieConfiguration(targetUrl);
expect(result.isErr()).toBe(true);
expect(result.unwrapErr()).toMatch(/no cookies/i);
expect(result.unwrapErr().message).toMatch(/no cookies/i);
});
test('should validate cookies for members-ng.iracing.com domain', async () => {