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.
This commit is contained in:
1 parent
0a889ebfed
commit
df0ac71bc3
1 file changed
+12
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
/// <reference types="jest" />
|
||||
|
||||
/**
|
||||
* 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;
|
||||
Reference in new issue
Block a user