Evalkeeper
    Preparing search index...

    Function describeFeedbackStoreContract

    • The contract every FeedbackStore must meet. make must return an empty store each time it's called, unless opts.scope is set (see describeStoreContract): then every feature the contract rates starts with the scope, and its lists ask for those features only. opts.without names columns the store's table doesn't have (an app's own thumbs table without inputs or statuses, say).

      Parameters

      • name: string

        What the tests are called, e.g. "our thumbs table".

      • make: () => FeedbackStore | Promise<FeedbackStore>

        Returns the store to test (an empty one, unless scoped).

      • opts: FeedbackStoreContractOptions = {}

        A scope and cleanup, missing columns, and test functions.

      Returns void

      describeFeedbackStoreContract(
      "our thumbs table",
      () => prismaFeedbackStore(prisma, feedbackMap),
      {
      without: ["input", "output", "status", "caseId"],
      scope: "contract-",
      cleanup: (scope) => deleteScopedRows(prisma, scope, { feedbackMap }),
      },
      );