UNPKG

@case-contract-testing/case

Version:

Next-generation contract testing suite

15 lines (14 loc) 872 B
import type { MatchContext } from '../../entities/context/types'; import type { MatchResult } from '../../entities/results/types'; import type { AnyCaseNodeType, CaseNodeFor, AnyData } from './matchers/types'; export * from './mocks/types'; export * from './mocks/setup.types'; export * from './matchers/types'; export type CheckMatchFn<T extends AnyCaseNodeType> = (matcher: CaseNodeFor<T>, matchContext: MatchContext, actual: unknown) => Promise<MatchResult> | MatchResult; export type StripMatcherFn<T extends AnyCaseNodeType> = (matcher: CaseNodeFor<T>, matchContext: MatchContext) => AnyData; export type NameMatcherFn<T extends AnyCaseNodeType> = (matcher: CaseNodeFor<T>, matchContext: MatchContext) => string; export interface MatcherExecutor<T extends AnyCaseNodeType> { describe: NameMatcherFn<T>; check: CheckMatchFn<T>; strip: StripMatcherFn<T>; }