Open KermanX opened 2 years ago
if your project is a typescript project, you might find using jest with typescript a much more intuitive way for setting up your development environment, which you do not need to deal with the .js
files at all and can debug/view the ts file directly...
if your project is a typescript project, you might find using jest with typescript a much more intuitive way for setting up your development environment, which you do not need to deal with the
.js
files at all and can debug/view the ts file directly...
Thanks for your help.
In fact, I use jest in this way months ago, but it seemed to be too complex to deal with jest
,babel
,tsc
,monorepo
,esm
,typescipt
etc together.😭
So I had to run jest through my own cli...
Thanks again.
Environment
vscode-jest version
: 4.3.1node -v
: v14.16.0npm -v
: 8.6.0npm ls jest
:Prerequisite
node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage --roots <CurrentPackage>/dist-test/
Steps to Reproduce
index.test.ts
.tsc
with configuration that tellstsc
to generate.js.map
file.index.test.js
andindex.test.js.map
.index.test.js
in a certain way (any way) byvscode-jest
.index.test.js
instead ofindex.test.ts
, not scanning the source map file.Expected Behavior
Scan the source map file.
Actual Behavior
Not scanning the source map file.
☆Why should it be like this
In vscode, using a monorepo, it is very common to use
ctrl
+left click
to jump to something defined in a ts file in another package.However, since "the another package" is installed by a link in `/node_modules/", and that file is actually a compiled js file, vscode scans the .js.map file, and jumps to the ts file recorded in map file that is the real source file.
So in my opinion, it won't be difficult for vscode-jest to have this feature if using something has already been implemented by vscode.