aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-06-09 17:00:16 -0700
committerGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-06-09 17:00:16 -0700
commite75f192da5e361015591d3d96e08a4db870bde64 (patch)
treef2e9c9d7b8a9f05cb269e210047f435eda863aa9
parentfc3331628e07bac73913917d11aa3c884d751137 (diff)
downloadbun-e75f192da5e361015591d3d96e08a4db870bde64.tar.gz
bun-e75f192da5e361015591d3d96e08a4db870bde64.tar.zst
bun-e75f192da5e361015591d3d96e08a4db870bde64.zip
Add jest.fn to types
-rw-r--r--packages/bun-types/bun-test.d.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/bun-types/bun-test.d.ts b/packages/bun-types/bun-test.d.ts
index ea0dfb6b4..c97d34d05 100644
--- a/packages/bun-types/bun-test.d.ts
+++ b/packages/bun-types/bun-test.d.ts
@@ -30,6 +30,7 @@ declare module "bun:test" {
interface Jest {
restoreAllMocks(): void;
+ fn<T extends AnyFunction>(): Mock<T>;
}
export const jest: Jest;
export namespace jest {
@@ -862,7 +863,7 @@ declare module "bun:test" {
/**
* Ensure that a mock function is called with specific arguments.
*/
- toHaveBeenCalledWith(...expected: Array<unknown>): void;
+ // toHaveBeenCalledWith(...expected: Array<unknown>): void;
};
}
@@ -1025,12 +1026,12 @@ declare namespace JestMock {
* List of the call order indexes of the mock. Jest is indexing the order of
* invocations of all mocks in a test file. The index is starting with `1`.
*/
- invocationCallOrder: Array<number>;
+ // invocationCallOrder: Array<number>;
/**
* List of the call arguments of the last call that was made to the mock.
* If the function was not called, it will return `undefined`.
*/
- lastCall?: Parameters<T>;
+ // lastCall?: Parameters<T>;
/**
* List of the results of all calls that have been made to the mock.
*/