From 2d6454976e191b8795706932ff3330fec32bc102 Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 1 Sep 2026 16:10:34 +0200 Subject: [PATCH] test(auth): passkey controller mocks need request headers now --- server/tests/unit/nest/auth-guard.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/tests/unit/nest/auth-guard.test.ts b/server/tests/unit/nest/auth-guard.test.ts index 2743adf5c..bcaf9a8c6 100644 --- a/server/tests/unit/nest/auth-guard.test.ts +++ b/server/tests/unit/nest/auth-guard.test.ts @@ -201,7 +201,7 @@ describe('CurrentUser decorator', () => { }); describe('PasskeyController', () => { - const req = { ip: '9.9.9.9' } as Request; + const req = { ip: '9.9.9.9', headers: {} } as Request; const res = {} as never; function rl(): RateLimitService { return new RateLimitService(); } @@ -269,7 +269,7 @@ describe('PasskeyController', () => { it('falls back to the "unknown" rate-limit key when req.ip is absent', async () => { passkey.passkeyLoginOptions.mockResolvedValue({ options: { challenge: 'z' } } as never); - const noIp = {} as Request; + const noIp = { headers: {} } as Request; expect(await pc(rl()).loginOptions(noIp)).toEqual({ challenge: 'z' }); }); });