fix: resolve lint and type-check issues introduced by persons redesign
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Successful in 2m30s
CI / Backend Unit Tests (pull_request) Failing after 2m37s
CI / E2E Tests (pull_request) Failing after 1h21m43s
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Successful in 2m30s
CI / Backend Unit Tests (pull_request) Failing after 2m37s
CI / E2E Tests (pull_request) Failing after 1h21m43s
- Cast PersonSummaryDTO array to concrete type in +page.server.ts (all fields are optional in the generated type but always populated at runtime) - Cast mockLocals/mockLocalsWriter to `any` in persons detail spec to match the pre-existing test pattern used throughout the codebase - Add .svelte-kit-backup/ to .gitignore and .prettierignore to prevent lint failures from Docker-owned leftover .svelte-kit directory Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1
frontend/.gitignore
vendored
1
frontend/.gitignore
vendored
@@ -6,6 +6,7 @@ node_modules
|
||||
.netlify
|
||||
.wrangler
|
||||
/.svelte-kit
|
||||
/.svelte-kit-backup
|
||||
/build
|
||||
|
||||
# OS
|
||||
|
||||
@@ -8,6 +8,10 @@ bun.lockb
|
||||
# Miscellaneous
|
||||
/static/
|
||||
|
||||
# Build artifacts
|
||||
/.svelte-kit/
|
||||
/.svelte-kit-backup/
|
||||
|
||||
# Generated files
|
||||
/src/lib/generated/
|
||||
/src/lib/paraglide/
|
||||
|
||||
@@ -45,8 +45,11 @@ export async function load({ url, fetch }) {
|
||||
}
|
||||
|
||||
const documents: Document[] = docsResult?.data ?? [];
|
||||
const allPersons: { id: string; firstName: string; lastName: string }[] =
|
||||
personsResult.data ?? [];
|
||||
const allPersons = (personsResult.data ?? []) as {
|
||||
id: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
}[];
|
||||
|
||||
const senderObj = allPersons.find((p) => p.id === senderId);
|
||||
const receiverObj = allPersons.find((p) => p.id === receiverId);
|
||||
|
||||
@@ -6,8 +6,10 @@ vi.mock('$lib/api.server', () => ({ createApiClient: vi.fn() }));
|
||||
import { createApiClient } from '$lib/api.server';
|
||||
|
||||
const mockFetch = vi.fn() as unknown as typeof fetch;
|
||||
const mockLocals = { user: { groups: [{ permissions: ['READ_ALL'] }] } };
|
||||
const mockLocalsWriter = { user: { groups: [{ permissions: ['WRITE_ALL'] }] } };
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const mockLocals = { user: { groups: [{ permissions: ['READ_ALL'] }] } } as any;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const mockLocalsWriter = { user: { groups: [{ permissions: ['WRITE_ALL'] }] } } as any;
|
||||
|
||||
beforeEach(() => vi.clearAllMocks());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user