UNPKG

@contract-case/case-core

Version:

Core functionality for the ContractCase contract testing suite

34 lines 1.88 kB
import { AnyMockDescriptorType } from '@contract-case/case-entities-internal'; import { MatchContext, CaseExample } from '@contract-case/case-plugin-base'; import { BaseCaseContract } from './BaseCaseContract'; import type { MultiTestInvoker } from './executeExample/types'; import type { CaseConfig } from './config/types'; import { ContractVerificationTest, DownloadedContract, ReaderDependencies } from './types'; export declare class ReadingCaseContract extends BaseCaseContract { private mutex; private makeBrokerService; private links; private status; private contractClosed; /** * Constructs a ReadingCaseContract * * @param contractFile - The DownloadedContract to verify * @param readerDependencies - The dependencies for a contract reader (injected) * @param config - the CaseConfig for this run * @param parentVersions - the array of versions of all the ContractCase packages before this one */ constructor(contractFile: DownloadedContract, { resultFormatter: resultPrinter, makeLogger, defaultConfig, makeBrokerService, }: ReaderDependencies, config: CaseConfig, parentVersions: string[]); callExecuteExample<T extends AnyMockDescriptorType>(index: number, invoker: MultiTestInvoker<T>, completionCallback?: () => void): Promise<void>; /** * Gets the tests that can be used later to verify the contract * * @param invoker - The invoker for this test * @returns a list of {@link ContractVerificationTest}s that can be run later * with the `runTest` callback on the ContractVerificationTest */ getTests<T extends AnyMockDescriptorType>(invoker: MultiTestInvoker<T>): ContractVerificationTest[]; recordExample(example: CaseExample, currentContext: MatchContext): CaseExample; endRecord(): Promise<void>; } //# sourceMappingURL=ReadingCaseContract.d.ts.map