import type { Control } from '../../Control.js'; import type { MockFunction, MockParameters } from '../../mocks/index.js'; declare module '../../expect.js' { interface Validators { /** * Asserts that the mock function was called at least once with the provided * arguments. * * The arguments are checked for deep equality and can also be matchers. * * Because this validator does not print the actual received arguments in * case of failure it is recommended to use one of the following matchers * instead: * * - `expect(fn).toHaveBeenOnlyCalledWith(...)` * - `expect(fn).toHaveBeenLastCalledWith(...)` * - `expect(fn).toHaveBeenNthCalledWith(time, ...)` * * @param args - The arguments the mock function was expected to be called * with. They can also be matchers. * * @example * ```ts * import { expect, mockFn } from 'earl' * * const fn = mockFn((a: number, b: number) => a + b) * fn(1, 2) * fn(3, 4) * expect(fn).toHaveBeenCalledWith(3, expect.a(Number)) * expect(fn).not.toHaveBeenCalledWith(5, 6) * ``` */ toHaveBeenCalledWith(this: Validators>, ...args: MockParameters): void; } } export declare function toHaveBeenCalledWith(control: Control, ...expected: unknown[]): void; //# sourceMappingURL=toHaveBeenCalledWith.d.ts.map