diff --git a/src/lib/measurements/__tests__/import-apple-health-export.test.ts b/src/lib/measurements/__tests__/import-apple-health-export.test.ts index e5f346f5b..1fc88cdc7 100644 --- a/src/lib/measurements/__tests__/import-apple-health-export.test.ts +++ b/src/lib/measurements/__tests__/import-apple-health-export.test.ts @@ -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, }: { diff --git a/src/lib/measurements/__tests__/import-large-export-memory.test.ts b/src/lib/measurements/__tests__/import-large-export-memory.test.ts index e3c784041..04871867f 100644 --- a/src/lib/measurements/__tests__/import-large-export-memory.test.ts +++ b/src/lib/measurements/__tests__/import-large-export-memory.test.ts @@ -297,6 +297,7 @@ function makeDiscardingPrisma(sample: () => void) { externalId: row.externalId, })); }, + groupBy: async () => [], findMany: async () => [], findFirst: async () => null, update: async () => {