test(import): answer the MANUAL-type lookup in the import mocks

This commit is contained in:
Marc-André Bombeck committed 2026-10-04 14:49:07 +02:00
1 parent 67e8e7c4f2
commit bc0d9f915f
2 files changed
+16

No files matched your search

@@ -271,6 +271,21 @@ function makeFakePrisma(
}
return returned;
},
// The import reads once which types hold MANUAL rows.
groupBy: async ({
where,
}: {
where: { userId: string; source: string };
}) =>
[
...new Set(
measurements
.filter(
(m) => m.userId === where.userId && m.source === where.source,
)
.map((m) => m.type),
),
].map((type) => ({ type })),
findMany: async ({
where,
}: {
@@ -297,6 +297,7 @@ function makeDiscardingPrisma(sample: () => void) {
externalId: row.externalId,
}));
},
groupBy: async () => [],
findMany: async () => [],
findFirst: async () => null,
update: async () => {