You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by nickiepucel February 12, 2024
The problem
@types/jest-when always adds the global jest types (@types/jest) to the TypeScript global namespace. I believe this is happening here.
This makes importing @types/jest-when incompatible with using @jest/globals/injectGlobals: false because it will result in TypeScript test files compiling when they should not.
Example
Assume I have installed jest-when, @type/jest-when, jest and @jest/globals.
// something.test.ts// import { describe } from "@jest/globals";// This compiles after I install `@types/jest-when` because it automatically includes `@types/jest`// It should not compile until I uncomment the above import statement.describe("Something",()=>{});```</div>
The text was updated successfully, but these errors were encountered:
Discussed in #68604
Originally posted by nickiepucel February 12, 2024
The problem
@types/jest-when
always adds the global jest types (@types/jest
) to the TypeScriptglobal
namespace. I believe this is happening here.This makes importing
@types/jest-when
incompatible with using@jest/globals
/injectGlobals: false
because it will result in TypeScript test files compiling when they should not.Example
Assume I have installed
jest-when
,@type/jest-when
,jest
and@jest/globals
.The text was updated successfully, but these errors were encountered: