Evalkeeper
    Preparing search index...

    Function describeMappedReadCheck

    • A read-only check, as a test, that a store mapped onto your own tables reads what's already there: one test per suite that fails listing every case, answer, test, and output that doesn't parse, with counts. It only reads, so it's the check to run first, on a copy of real data. Pass the report from checkStoreReads (any store) or prismaReadCheck (sees a Prisma table's values before the store fills in defaults).

      Parameters

      • name: string

        What the tests are called, e.g. "our answer key".

      • check: () => Promise<ReadCheckReport>

        Makes the report; called once, when the tests run.

      • opts: ContractOptions & { suites: readonly string[] }

        The suite keys to name a test for, and test functions other than Vitest's.

      Returns void

      import { describeMappedReadCheck } from "@crowandraven/evalkeeper/testing";
      import { prismaReadCheck } from "@crowandraven/evalkeeper/prisma";

      describeMappedReadCheck(
      "our answer key",
      () => prismaReadCheck(prisma, map, { suites: SUITES }),
      { suites: SUITES.map((s) => s.key) },
      );