-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add meta-data arg to JSON event #5208
Conversation
When running Jest in watch mode, the test results that follow the "No tests found related to files changed since last commit" message will be empty. This commit adds detection for this message, and emits this info with the JSON test results.
Codecov Report
@@ Coverage Diff @@
## master #5208 +/- ##
========================================
+ Coverage 60.8% 60.9% +0.1%
========================================
Files 201 201
Lines 6707 6725 +18
Branches 3 4 +1
========================================
+ Hits 4078 4096 +18
Misses 2628 2628
Partials 1 1
Continue to review full report at Codecov.
|
Yep, this looks good to me - thanks @seanpoulter |
I think it would be great to have some integration tests for this stuff. Right now, when we change text in watch mode, we’d just break this unless people remember to search for usage of these strings. |
Good call @cpojer. Are there any similar integration tests running Jest I can look at for inspiration? |
Unfortunately we don't have anything for this yet. |
Could the test pull out the CLI source code and verify that the flags are still there? E.g. run |
Sorry for not keeping this one alive. 😞 I'll build on your idea @orta and figure out if we can print the expected strings without the fancy colors. Edit: Actually, a full integration test spawning Jest is quicker than I expected and is being pretty informative. I'll build it out for the "Watch Usage" prompt and send another PR. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
When running Jest in watch mode, the test results that follow the "No tests found related to files changed since last commit" message will be empty. This PR adds detection for this message, and emits this info with the JSON test results. This behavior is required for jest-community/vscode-jest#213.
Test plan
Tests have been added, and I've confirmed the expected behavior debugging
vscode-jest
./cc @orta