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
This logic seems to assume that ts-jest was installed in the node_modules/ts-jest folder as a direct dependency of the project that is being tested. This is not a reliable assumption in general.
For example, we use Jest in a monorepo with hundreds of projects. It would be very cumbersome to add ts-jest and all the other tooling dependencies as a direct dependency of every single project. Instead, we publish a toolchain package that brings along the compiler, test presets, Webpack configuration, etc. Our projects depend on this toolchain package, instead of depending on the tools themselves.
I can simply ignore this warning, however I'm a little concerned that in some cases the check may succeed and load configuration information from the wrong project. (For example, during upgrades we sometimes have multiple versions of our toolchain coexisting side-by-side in the node_modules folder.)
What is ts-jest looking for in the root of the project? Is there a better way to discover this information?
Issue:
I noticed this warning while running ts-jest:
It seems to be coming from this code:
Expected behavior:
This logic seems to assume that ts-jest was installed in the node_modules/ts-jest folder as a direct dependency of the project that is being tested. This is not a reliable assumption in general.
For example, we use Jest in a monorepo with hundreds of projects. It would be very cumbersome to add ts-jest and all the other tooling dependencies as a direct dependency of every single project. Instead, we publish a toolchain package that brings along the compiler, test presets, Webpack configuration, etc. Our projects depend on this toolchain package, instead of depending on the tools themselves.
I can simply ignore this warning, however I'm a little concerned that in some cases the check may succeed and load configuration information from the wrong project. (For example, during upgrades we sometimes have multiple versions of our toolchain coexisting side-by-side in the node_modules folder.)
What is ts-jest looking for in the root of the project? Is there a better way to discover this information?
@iclanton
The text was updated successfully, but these errors were encountered: