import type { Control } from '../../Control.js'; import type { MockFunction, MockParameters } from '../../mocks/index.js'; declare module '../../expect.js' { interface Validators { /** * Asserts that when the mock function was called the nth time it was called * with the given arguments. If the function was called less than n times * this will fail. * * The arguments are checked for deep equality and can also be matchers. * * If you would like to always check the last call use * `expect(fn).toHaveBeenLastCalledWith(...)` instead. * * @param n - The call number to check the arguments of. Index starts at 1. * @param args - The arguments the mock function was expected to be called * with the nth time. They can also be matchers. * * @example * ```ts * import { expect, mockFn } from 'earl' * * const fn = mockFn((a: string, b: string) => a + ' ' + b) * fn('i like', 'pancakes') * fn('you like', 'waffles') * * expect(fn).toHaveBeenNthCalledWith(1, 'i like', expect.a(String)) * expect(fn).toHaveBeenNthCalledWith(2, 'you like', 'waffles') * expect(fn).not.toHaveBeenNthCalledWith(2, 'you like', 'pancakes') * ``` */ toHaveBeenNthCalledWith(this: Validators>, n: number, ...args: MockParameters): void; } } export declare function toHaveBeenNthCalledWith(control: Control, n: number, ...expected: unknown[]): void; //# sourceMappingURL=toHaveBeenNthCalledWith.d.ts.map