@contract-case/case-core
Version:
Core functionality for the ContractCase contract testing suite
21 lines • 1.3 kB
TypeScript
import { AnyMockDescriptorType } from '@contract-case/case-entities-internal';
import { MatchContext, CaseExample } from '@contract-case/case-plugin-base';
import { BaseCaseContract } from './BaseCaseContract';
import type { TestInvoker } from './executeExample/types';
import type { CaseConfig, ContractWriteSuccess, WriterDependencies } from './types';
import { CaseContractDescription } from '../entities/types';
export declare class WritingCaseContract extends BaseCaseContract {
private testIndex;
private mutex;
private dependencies;
/**
* Indicates that the contract has been closed by endRecord.
* After this, no new interactions can be written to the contract
*/
private contractClosed;
constructor(description: CaseContractDescription, dependencies: WriterDependencies, config: CaseConfig, parentVersions: Array<string>);
executeTest<T extends AnyMockDescriptorType, R>({ states, mockDescription, trigger, testResponse, triggers, testErrorResponse, triggerAndTest, triggerAndTests, stateHandlers, }: TestInvoker<T, R>, runConfig: CaseConfig): Promise<unknown>;
recordExample(example: CaseExample, currentContext: MatchContext): CaseExample;
endRecord(): Promise<ContractWriteSuccess>;
}
//# sourceMappingURL=WritingCaseContract.d.ts.map