Evalkeeper
    Preparing search index...

    Type Alias ScopedContractOptions

    ScopedContractOptions: ContractOptions & {
        cleanup?: (scope: string) => Promise<unknown>;
        scope?: string;
    }

    Options for running a store contract on a database that holds other rows too, such as a shared development database.

    Type Declaration

    • Optionalcleanup?: (scope: string) => Promise<unknown>

      Deletes the rows whose suite or feature starts with the scope, once after the contract's tests (and so also any left by an earlier run that stopped early). Needs scope, and afterAll among the test functions. For Prisma, deleteScopedRows from @crowandraven/evalkeeper/prisma.

    • Optionalscope?: string

      A prefix for every suite and feature the contract writes (each test adds its own after it), so its rows never mix with others and make needn't return an empty store. Without it, make must return an empty store every time.