Open ScottSEA opened 1 year ago
noticed you are using npm 7.x, which had issue with pass-through argument interpretation, see comment. Can you try with npm >= 8.15?
Hi, I had the same problem before, but now (in v6.3.1), with npm 10.8.2, it seems to work correctly.
Environment
vscode-jest version
: 5.2.3node -v
: v14.17.0npm -v
: 7.24.2npm ls jest
: bananaProject@1.1.0 C:\git\Banana\application\bananaFolder ├─┬ react-scripts@4.0.1 │ ├─┬ jest-watch-typeahead@0.6.1 │ │ └── jest@26.6.0 deduped │ └── jest@26.6.0 └─┬ bananaMan-common@2.3.1017 └─┬ jest-enzyme@7.1.2 ├─┬ jest-environment-enzyme@7.1.2 │ └── jest@26.6.0 deduped └── jest@26.6.0 dedupedPrerequisite
npm run test
ornode_modules/.bin/jest
) npm run test (test script is"test": "react-scripts test --env=jsdom"
Steps to Reproduce
When running all tests in the project with Run Test (either from menu or green play button), the command generated is:
When running a test in Debug for a single test or single file (either from the Menu or green debug button) the command generated is:
When running a Run Test for a single test or single file (either from the Menu or green play button) the command generated is:
Note the file name has extraneous backslashes inside the name of the file and all the backslashes are escaped unlike the paths in the Debug mode (which works as expected).
Relevant Debug Info
Here is the output:
Expected Behavior
Test is found and runs.
Actual Behavior
see above
The fastest (and the most fun) way to resolve the issue is to submit a pull-request yourself. If you are interested, feel free to check out the contribution guide, we look forward to seeing your PR...