Closed selvakumar-invicara closed 2 years ago
I've tried to get this work by putting this in my settings.json
:
"jestrunner.debugOptions": {
"runtimeArgs": "--experimental-vm-modules"
},
Unfortunately, the flag is not injected correctly. It adds a space in between each character in the flag:
/path/to/node - - e x p e r i m e n t a l - v m - m o d u l e s ./node_modules/.bin/jest
In case it's relevant, I am using zsh as my shell.
Turns out the args needed to be in an array:
"jestrunner.debugOptions": {
"runtimeArgs": ["--experimental-vm-modules"]
},
Not sure where I got the idea to use a single string lol.
Hi,
Can you please share your settings (package.json, settings.json, jest-config.json, etc). I am trying to set this up using *.mjs files and I can't debug them with this extension.
I am getting this error: Cannot use import statement outside a module
Like @eltoroit , I could really use a settings.json
sample file.
Right now, it's as if jestrunner.*
settings were ignored altogether. I even tried giving jestrunner.jestPath
an unexisting path just to make sure it fails; it didn't.
We follow ESM, so to make jest to be work I used below command,
node --experimental-vm-modules node_modules/.bin/jest
I have given this command in
jestrunner.jestCommand
to make jest runner to work for RUN. But It doesn't work for debug and never seeing any options pass this argument. If I add it in debugOptions then it append it as below/usr/local/bin/node ./node_modules/.bin/jest --experimental-vm-modules
which gives an error as the argument should be before jest.
Is there any way to solve this problem