I'm running vscode in wsl2 with the orta.vscode-jest extension. The extension would work fine when I opened vscode through powershell, but when I run vscode through wsl2 I get the following error:
I also get the following error
not-test onProcessExit: process exit with code=4294963238, signal=undefined
see troubleshooting: https://github.com/jest-community/vscode-jest/blob/master/README.md#troubleshooting
'\\wsl.localhost\Ubuntu\home\{mypath}\wwwroot'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Windows\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Windows\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Roaming\npm-cache\_logs\2021-09-13T16_50_21_922Z-debug.log
Jest process "watch-tests" ended unexpectedly
see troubleshooting: https://github.com/jest-community/vscode-jest/blob/master/README.md#troubleshooting
It's running within a React app with these jest settings in package.json
"jest": {
"coverageReporters": [
"lcov",
"text"
],
"coveragePathIgnorePatterns": [
"src/index.tsx",
"src/locales/"
],
"coverageThreshold": {
"global": {
"branches": 84,
"functions": 85,
"lines": 85,
"statements": 85
}
}
}
I can run my coverage from the cli using "npm run coverage" where the coverage script is defined as follows:
react-scripts test --coverage --resetMocks=false
But I'd like the watch functionality to work.
Any help would be appreciated!
