Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/server/server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ describe('handleCallbackRoute', () => {
await handleCallbackRoute()({ request });

const callbackErrorLogs = consoleErrorSpy.mock.calls.filter(
(args) => typeof args[0] === 'string' && args[0].includes('OAuth callback failed'),
(args: unknown[]) => typeof args[0] === 'string' && args[0].includes('OAuth callback failed'),
);
expect(callbackErrorLogs).toHaveLength(1);
expect(callbackErrorLogs[0]![1]).toBe(originalError);
Expand Down Expand Up @@ -389,7 +389,7 @@ describe('handleCallbackRoute', () => {
await handleCallbackRoute(options ?? {})({ request });

const callbackErrorLogs = consoleErrorSpy.mock.calls.filter(
(args) => typeof args[0] === 'string' && args[0].includes('OAuth callback failed'),
(args: unknown[]) => typeof args[0] === 'string' && args[0].includes('OAuth callback failed'),
);
expect(callbackErrorLogs).toHaveLength(1);
});
Expand Down Expand Up @@ -460,7 +460,7 @@ describe('handleCallbackRoute', () => {
expect(response.headers.get('Location')).toBeNull();

const callbackErrorLogs = consoleErrorSpy.mock.calls.filter(
(args) => typeof args[0] === 'string' && args[0].includes('OAuth callback failed'),
(args: unknown[]) => typeof args[0] === 'string' && args[0].includes('OAuth callback failed'),
);
expect(callbackErrorLogs).toHaveLength(1);
});
Expand All @@ -478,10 +478,10 @@ describe('handleCallbackRoute', () => {
expect(response.headers.getSetCookie().some((c) => c.startsWith(`${PKCE_COOKIE_NAME}=`))).toBe(true);

const callbackLogs = consoleErrorSpy.mock.calls.filter(
(args) => typeof args[0] === 'string' && args[0].includes('OAuth callback failed'),
(args: unknown[]) => typeof args[0] === 'string' && args[0].includes('OAuth callback failed'),
);
const malformedLogs = consoleErrorSpy.mock.calls.filter(
(args) => typeof args[0] === 'string' && args[0].includes('errorRedirectUrl is malformed'),
(args: unknown[]) => typeof args[0] === 'string' && args[0].includes('errorRedirectUrl is malformed'),
);
expect(callbackLogs).toHaveLength(1);
expect(malformedLogs).toHaveLength(1);
Expand All @@ -496,7 +496,7 @@ describe('handleCallbackRoute', () => {
expect(response.headers.get('Content-Type')).toBe('application/json');

const malformedLogs = consoleErrorSpy.mock.calls.filter(
(args) => typeof args[0] === 'string' && args[0].includes('errorRedirectUrl is malformed'),
(args: unknown[]) => typeof args[0] === 'string' && args[0].includes('errorRedirectUrl is malformed'),
);
expect(malformedLogs).toHaveLength(1);
expect(malformedLogs[0]![0]).toContain('falling back to JSON 400');
Expand Down
Loading