UI not updating after test run
See original GitHub issueEnvironment
-
node -v
: [8.9.4] -
npm -v
: [6.1.0] -
npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): [jest@23.6.0] -
your vscode-jest settings if customized:
- jest.pathToJest? [fill]
- jest.pathToConfig? [fill]
- anything else that you think might be relevant? [fill]
-
Operating system: [OSX 10.13.6]
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
ornode_modules/.bin/jest
) [npm run test]
Steps to Reproduce
- set jest.runAllTestsFirst to false
- restart
- go to test file and run jest using Jest: start runner
- go to output in the bottom drawer and select “jest”, observe that tests ARE running correctly
- observe that ui of code file is not updated at all (empty green circles indicating tests have not run even though they have)
- originally posted with error from console, but that was being caused by another plugin
Relevant Debug Info
this is happening when I don’t have runAllTestsFirst enabled (which is a non-starter for me because of the massive amounts of tests in this monolithic code base), and also when I do have runAllTestsFirst enabled, and then try to debug a test.
Expected Behavior
The UX of the code editor updates, showing filled green circles indicating tests ran. The UX shows an error message on lines where the test fails.
Actual Behavior
The tests can be observed to run in the output drawer, but it does not update in the code editor
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…
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:8
Top GitHub Comments
@jeromesubs there might be some misunderstanding, this extension doesn’t read the terminal output as the attached image above seems indicated. Instead, it spawns its own node process to run jest according to
jest.pathToJest
setting. Therefore if you want it to executenpm run test
, you will need to set"jest.pathToJest":"npm run test"
in your “.vscode/settings.json”. You can see the output of the jest in the “Output” tab by clicking on the “Jest” status on the status-bar.@counterbeing Same here. But I guess this is a bug of the extension because for Jest the tests with the same name are different tests. So maybe the extension should use some prefix to differentiate test names? For example something like this
${filePath}-${testLineNumberInFile}-${testName}
.