From bad70562249a079fbc3ccbf3ba7eee7134ce93eb Mon Sep 17 00:00:00 2001 From: Lukas Elmer Date: Thu, 3 Aug 2023 06:02:34 +0200 Subject: [PATCH] Fix toHaveBeenCalledExactlyOnceWith typing (#633) * Fix toHaveBeenCalledExactlyOnceWith typing * Add changeset --- .../fix-to-have-been-called-exactly-once-with-typings.md | 5 +++++ types/index.d.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/fix-to-have-been-called-exactly-once-with-typings.md diff --git a/.changeset/fix-to-have-been-called-exactly-once-with-typings.md b/.changeset/fix-to-have-been-called-exactly-once-with-typings.md new file mode 100644 index 00000000..03086c76 --- /dev/null +++ b/.changeset/fix-to-have-been-called-exactly-once-with-typings.md @@ -0,0 +1,5 @@ +--- +'jest-extended': patch +--- + +Fix `toHaveBeenCalledExactlyOnceWith` typings diff --git a/types/index.d.ts b/types/index.d.ts index 8c1018bf..a0cef966 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -166,7 +166,7 @@ interface CustomMatchers extends Record { /** * Use `.toHaveBeenCalledExactlyOnceWith` to check if a `Mock` was called exactly one time with the expected value. */ - toHaveBeenCalledExactlyOnceWith(): R; + toHaveBeenCalledExactlyOnceWith(...args: unknown[]): R; /** * Use `.toBeNumber` when checking if a value is a `Number`.