-
-
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
feat: report Individual Test Cases #10227
Conversation
9296d86
to
d08c35d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think this is good to go! I'll hold off on merging until tomorrow to give more people the chance to review if they want.
Great job @kunal-kushwaha & @sauravhiremath! 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no blockers by any means, I just went over the whole PR holistically one last time 🙂
@@ -41,9 +41,9 @@ test('injects the serializable module map into each worker in watch mode', async | |||
{context, path: './file2.test.js'}, | |||
], | |||
new TestWatcher({isWatchMode: globalConfig.watch}), | |||
() => {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice with some new tests that verify the correct events are emitted
Can do #10227 (comment) when adding the test events discussed in #10227 (comment) |
In which release is this going to show up? And what do I have to change in my tests to make use of this? |
It's released in 26.2.0, and you don't have to change anything beyond using |
I don't know what I'm doing wrong, but I'm still seeing all tests output at once when the last one finishes, and nothing before. I've create an MWE at https://github.com/retorquere/jest-circus-test. Would appreciate feedback on what I should be doing differently. |
@@ -90,18 +98,55 @@ class TestRunner { | |||
if (watcher.isInterrupted()) { | |||
throw new CancelRun(); | |||
} | |||
let sendMessageToJest: JestTestFileEvent; | |||
|
|||
// Remove `if(onStart)` in Jest 27 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sauravhiremath @kunal-kushwaha you wouldn't by any chance be up for sending a PR removing onStart
etc? 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SimenB I'll be happy to look into it 😄
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 ⚡
testSuites
incrementally, and update individual test cases batch-wise. This PR attempts to report the progress of the individual (atomic) test-cases.eventListeners
for the worker processes to send back the test results to their parent.Previous References and suggestions
Test plan ⚡
onCustomMessage
functions to pass tests (caused by updating its Type)API implemented as suggested here - Report progress of individual test cases #6616 (comment)
Current Implementation
Authors
Co-author - Saurav M. H @sauravhiremath
Co-author - Kunal Kushwaha @kunal-kushwaha
Co-author - Rogelio Guzman @rogeliog
Acknowledgements
@kunal-kushwaha for his super awesome contribution 🚀 🚀
@rogeliog for laying down the foundation for this PR. 🚀
@SimenB and @jevakallio for their time and reviews 👏