mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 08:02:12 +00:00
test(documents): mock content-index lookup and pair new animations with motion-reduce
The PATCH detail route now reads the content-index provenance, so its route test mocks documentContentIndex.findUnique; the searchable status spinner and the Read-with-AI pulse pair with motion-reduce:animate-none per the coverage guard.
This commit is contained in:
1 parent
11fd48cc0e
commit
0b973f4f76
3 files changed
+14
-2
No files matched your search
@@ -22,6 +22,9 @@ vi.mock("@/lib/db", () => ({
|
||||
deleteMany: vi.fn(),
|
||||
createMany: vi.fn(),
|
||||
},
|
||||
documentContentIndex: {
|
||||
findUnique: vi.fn(),
|
||||
},
|
||||
illnessEpisode: {
|
||||
findMany: vi.fn(),
|
||||
},
|
||||
@@ -131,6 +134,9 @@ beforeEach(() => {
|
||||
vi.mocked(prisma.documentConditionLink.createMany).mockResolvedValue({
|
||||
count: 0,
|
||||
} as never);
|
||||
vi.mocked(prisma.documentContentIndex.findUnique).mockResolvedValue(
|
||||
null as never,
|
||||
);
|
||||
});
|
||||
|
||||
describe("PATCH /api/documents/inbound/[id]", () => {
|
||||
|
||||
Reference in new issue
Block a user