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 exactly once and with the * provided arguments. * * The arguments are checked for deep equality and can also be matchers. * * If you don't care that the function was only called once use * `expect(fn).toHaveBeenNthCalledWith(1, ...)` instead. * * @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 fn1 = mockFn((a: number, b: number) => a + b) * fn1(1, 2) * expect(fn1).toHaveBeenOnlyCalledWith(1, expect.a(Number)) * * const fn2 = mockFn((a: number, b: number) => a + b) * fn2(1, 2) * fn2(3, 4) * expect(fn2).not.toHaveBeenOnlyCalledWith(1, 2) * ``` */ toHaveBeenOnlyCalledWith(this: Validators>, ...args: MockParameters): void; } } export declare function toHaveBeenOnlyCalledWith(control: Control, ...expected: unknown[]): void; //# sourceMappingURL=toHaveBeenOnlyCalledWith.d.ts.map