How to run test cases of only the file currently being edited.
See original GitHub issueEnvironment
-
node -v
: [fill] -
npm -v
: [fill] -
npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): [fill] -
your vscode-jest settings if customized:
- jest.pathToJest? [fill]
- jest.pathToConfig? [fill]
- anything else that you think might be relevant? [fill]
-
Operating system: [fill]
Prerequisite
- are you able to run jest test from command line? [fill]
- how do you run your tests from command line? (for example:
npm run test
ornode_modules/.bin/jest
) [fill]
Steps to Reproduce
[fill]
Relevant Debug Info
[fill]
Expected Behavior
[fill]
Actual Behavior
[fill]
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 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Run jest for unit tests of modified files only | by SunCommander
In this article, you will learn how to run Jest for modified files only in a Pull Request. This can be done using...
Read more >JEST: Is there a solution to run tests only for changed ...
First you'll want to get a list of all the changed files through Git. This can be achieved through a function like the...
Read more >Running the Current Test File in VS Code - Atomic Spin
Scrolling the Terminal. Using a keyboard shortcut to execute the test runner for the file currently being edited works quite well in VS...
Read more >Selecting test cases to run by checking what's changed
Then check if lines from each coverage are currently different (or there's a new test) - if so, add it to the testcases...
Read more >Running manual tests in off-line mode - IBM
To run a manual test off-line: Export the file from the Engineering Test Management repository: Locate the test case execution record or test...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In theory, once you turned off the
jest.runAllTestsFirst
, jest should only run the tests that “changed”. However, if you want to run the files opened, regardless if they are changed, which sounded like an 'on-demand" testing… such feature doesn’t exist yet… although I can see it could be useful for some use case… PR is welcome.@raphaelbs it’s not officially released in the marketplace yet, but you can install it using the VSIX file, please see “How to test” section in v4.0.0-alpha.5 release note.