npm ls jest or npm ls react-scripts (if you haven’t ejected): react-scripts@2.1.5
your vscode-jest settings if customized:
jest.pathToJest? "npm run test:watch"
jest.pathToConfig? unset
jest.rootPath? "./ClientApp"
anything else that you think might be relevant? React app is in a subfolder called ClientApp
Operating system: Windows 10 Pro (10.0.17134)
Prerequisite
are you able to run jest test from command line? Yes
how do you run your tests from command line? (for example: npm run test or node_modules/.bin/jest) npm run test:watch
Steps to Reproduce
Setup a repo using dotnet new reactredux
Load up in VS Code with this extension installed.
Open a terminal and run dotnet restore on the root directory (optional)
Run cd ClientApp and npm install to install dependencies
Start the jest runner from this extension
Go to the output tab on the bottom and select jest from the dropdown.
Relevant Debug Info
Running on console finds ClientApp/src/tests/App.test.tsx while it appears that the same command from the same location in this extension does not.
Command run in Powershell (npm run test:watch):
> my-pushka@0.1.0 test C:\Users\menachem\source\repos\project\ClientApp
> react-scripts test --env=jsdom
Command output in Jest
> my-pushka@0.1.0 test c:\Users\menachem\source\repos\project\ClientApp
> react-scripts test --env=jsdom "C:\Users\menachem\AppData\Local\Temp/jest_runner.json"
No tests found
In c:\Users\menachem\source\repos\project\ClientApp
15 files checked.
testMatch: c:\Users\menachem\source\repos\project\ClientApp\src\**\__tests__\**\*.{js,jsx,ts,tsx},c:\Users\menachem\source\repos\project\ClientApp\src\**\?(*.)(spec|test).{js,jsx,ts,tsx} - 1 match
testPathIgnorePatterns: \\node_modules\\ - 15 matches
Pattern: C:\Users\menachem\AppData\Local\Temp\\jest_runner.json - 0 matches
npm
ERR! Test failed. See above for more details.
Finished running all tests. Starting watch mode.
This repeats a few times until the extension stops.
Expected Behavior
Tests should be found (as they are on the command line) and run accordingly.
Environment
node -v
: v10.15.1npm -v
: 6.4.1npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): react-scripts@2.1.5your vscode-jest settings if customized:
ClientApp
Operating system: Windows 10 Pro (10.0.17134)
Prerequisite
npm run test
ornode_modules/.bin/jest
) npm run test:watchSteps to Reproduce
dotnet new reactredux
dotnet restore
on the root directory (optional)cd ClientApp
andnpm install
to install dependenciesRelevant Debug Info
Running on console finds
ClientApp/src/tests/App.test.tsx
while it appears that the same command from the same location in this extension does not.Command run in Powershell (
npm run test:watch
):Command output in Jest
This repeats a few times until the extension stops.
Expected Behavior
Tests should be found (as they are on the command line) and run accordingly.
Actual Behavior
Tests are not found causing extension to fail.