Friday 19 March 2021

Migration from JS to TS, Jest doesn't see "globals"

I recently migrated my code base from JS to TS and everything is looking good so far.

The issue I am facing is that when I try to change the test file extensions to .ts or .tsx as needed, Jest no longer sees all my global variables and setup files.

My package.json, jest.config.js, and tsconfig.development.json.

Is the only solution to use a library like ts-jest (I would like to avoid this if possible)?

If so, I tried previously and wasn't able to get it working (same issue as above). Could someone please kindly provide some hints in the right direction?



from Migration from JS to TS, Jest doesn't see "globals"

No comments:

Post a Comment