From df0ac71bc3e447eb6a3995a56d3a89ca3bc79b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB=20Kooijmans?= Date: Fri, 9 Oct 2026 16:41:21 +0200 Subject: [PATCH] test(types): bridge the Jest global value for typechecking @types/jest v29 declares the jest namespace without a global value; reference it explicitly and re-add the global used by setup/test files. --- types/jest.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 types/jest.d.ts 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;