diff --git a/types/jest.d.ts b/types/jest.d.ts new file mode 100644 index 0000000..6ad971c --- /dev/null +++ b/types/jest.d.ts @@ -0,0 +1,12 @@ +/// + +/** + * Bridge the Jest global value. + * + * `@types/jest` declares the `jest` namespace but (since v29) no global value, + * while the runtime provides one and `@jest/globals` types it. This ambient + * declaration re-adds the global so setup and test files can keep calling + * `jest.mock` / `jest.fn` without importing. + */ + +declare const jest: typeof import('@jest/globals').jest;