I found this issue. Happy to help unless you guys can find the root-cause in 15 seconds of if there's a painless workaround 😄
Environment
node -v: v10.15.0
npm -v: 6.5.0
npm ls jest or npm ls react-scripts (if you haven’t ejected): jest@23.6.0
your vscode-jest settings if customized:
jest.pathToJest? npm test --
jest.pathToConfig? not set
anything else that you think might be relevant?
"jest.rootPath":"client/ui"
also
setting jest.pathToJest to npm test . -- works apparently, but it disables the jest smart git check for changes I reckon
Operating system: Windows 10 + WSL (Ubuntu)
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 test / npm run test works flawslessly. Also opening the folder client/ui with VSCode works as expected
Steps to Reproduce
empty workspace
create a subfolder (eg: client)
inside this subfolder, create another one (eg: ui) that will store the js code (eg: create-react-app)
to allow the extension to find the tests, adjust the .vscode/settings.json adding the following:
"jest.rootPath": "client/ui",
"jest.pathToJest": "npm test --"
start the extension (eg: via Jest: Start Runner)
create a failing test (eg: expect(true).toBe(false))
change the test file to make it succeed (eg: expect(true).toBe(true))
save the file
the runner runs and outputs:
No tests found related to files changed since last commit.
Relevant Debug Info
if I set
jest.pathToJest": "npm test . --"
the watcher picks up the change (not sure about the impact down the line though)
Expected Behavior
The watcher should detect the change even if the web project is in a subfolder, set via jest.rootPath
Actual Behavior
After the first run, changes are not detected
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...
I am having the same issue. Also using a subDirectory 'client'
Any solutions for this?
I also tried it by prepending on it
@deblasis where you able to fix it?
Hi there, first of all thank you for this!
I found this issue. Happy to help unless you guys can find the root-cause in 15 seconds of if there's a painless workaround 😄
Environment
node -v
: v10.15.0npm -v
: 6.5.0npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): jest@23.6.0your vscode-jest settings if customized:
jest.pathToJest
tonpm test . --
works apparently, but it disables the jest smart git check for changes I reckonOperating system: Windows 10 + WSL (Ubuntu)
Prerequisite
npm run test
ornode_modules/.bin/jest
) npm test / npm run test works flawslessly. Also opening the folderclient/ui
with VSCode works as expectedSteps to Reproduce
client
)ui
) that will store the js code (eg: create-react-app).vscode/settings.json
adding the following:Jest: Start Runner
)eg: expect(true).toBe(false)
)eg: expect(true).toBe(true)
)Relevant Debug Info
if I set
the watcher picks up the change (not sure about the impact down the line though)
Expected Behavior
The watcher should detect the change even if the web project is in a subfolder, set via
jest.rootPath
Actual Behavior
After the first run, changes are not detected
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...