test: share fakePdfjs fixture across viewer test files #542
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
makeFakePdfjsLib()is currently defined independently in two test files:frontend/src/lib/document/viewer/PdfViewer.svelte.spec.tsfrontend/src/lib/document/viewer/usePdfRenderer.svelte.test.tsThe two copies are structurally similar but not identical. As more components adopt the
libLoaderinjection pattern (per ADR 012), this fake will be defined a third and fourth time, causing drift between implementations.Acceptance criteria
frontend/src/lib/document/viewer/__testUtils__/fakePdfjs.ts(or equivalent path) exportingmakeFakePdfjsLib()andmakeFakeLibLoader()Raised by Felix Brandt in PR #536 round-4 review.