strong-mock
Version:
Type safe mocking library for TypeScript
31 lines (30 loc) • 1.01 kB
TypeScript
import type { Matcher } from '../matchers/matcher';
import type { Property } from '../proxy';
import type { Expectation } from './expectation';
import type { ReturnValue } from './repository/return-value';
/**
* Matches a call with more parameters than expected because it is assumed the
* compiler will check that those parameters are optional.
*
* @example
* new StrongExpectation(
* 'bar',
* deepEquals([1, 2, 3]),
* 23
* ).matches('bar', [1, 2, 3]) === true;
*/
export declare class StrongExpectation implements Expectation {
property: Property;
args: Matcher[] | undefined;
returnValue: ReturnValue;
private exactParams;
private matched;
min: number;
max: number;
constructor(property: Property, args: Matcher[] | undefined, returnValue: ReturnValue, exactParams?: boolean);
setInvocationCount(min: number, max?: number): void;
matches(args: any[] | undefined): boolean;
isUnmet(): boolean;
private matchesArgs;
toString(): string;
}