UNPKG

@contract-case/case-core-plugin-function-dsl

Version:

ContractCase core function plugin DSL

26 lines 1.38 kB
import { AnyCaseMatcherOrData } from '@contract-case/case-plugin-dsl-types'; export declare const FUNCTION_ARGUMENTS_MATCHER_TYPE: "_case:FunctionArgumentsMatcher"; export declare const FUNCTION_RESULT_MATCHER_TYPE: "_case:FunctionResultMatcher"; export interface CoreFunctionArgumentsMatcher { '_case:matcher:type': typeof FUNCTION_ARGUMENTS_MATCHER_TYPE; arguments: AnyCaseMatcherOrData[]; } /** * Matches a return value from a function */ export interface CoreFunctionSuccessResultMatcher { '_case:matcher:type': typeof FUNCTION_RESULT_MATCHER_TYPE; success: AnyCaseMatcherOrData; } /** * Matches an error result */ export interface CoreFunctionErrorResultMatcher { '_case:matcher:type': typeof FUNCTION_RESULT_MATCHER_TYPE; errorClassName: AnyCaseMatcherOrData; message?: AnyCaseMatcherOrData; } export declare const functionArgumentsMatcher: (expectedArguments: AnyCaseMatcherOrData[], invocationName: string | undefined) => CoreFunctionArgumentsMatcher; export declare const functionReturnSuccessMatcher: (returnValue: AnyCaseMatcherOrData, responseName: string | undefined) => CoreFunctionSuccessResultMatcher; export declare const functionThrowsErrorMatcher: (errorClassName: AnyCaseMatcherOrData, message?: AnyCaseMatcherOrData, responseName?: string | undefined) => CoreFunctionErrorResultMatcher; //# sourceMappingURL=matchers.d.ts.map