-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Rework snapshot matcher to support parallel mocha #5813
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
Conversation
|
@bajtos Please fix code formatting. |
|
|
Fair enough.
I am not comfortable with using Let's use |
aba0a64 to
f7d26cf
Compare
|
I rebased the patch on top of the latest master, addressed review comments and made few more improvements/cleanups:
@raymondfeng I consider the PR as ready for final review, PTAL. |
|
(I'll clean up the commit history before merging.) |
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
…sting - For each snapshotDir, share the same instance of snapshot matcher - Use Mocha root hooks to inject the current test, reset snapshot matchers and update snapshot files. - Add .mocharc.js for packages/cli to register root hooks Co-Authored-By: Miroslav Bajtoš <mbajtoss@gmail.com>
f7d26cf to
e16d378
Compare
Extracted from #5011 to land the changes in isolation from the actual enablement of parallel testing.
The first commit is cherry-picked 20da28e, then I added more commits to clean up the code more to my liking.
My intention is to further clean up the commit history once we agree on the implementation direction & details.
To verify parallel tests, one can run the test suite via
npm test -- --parallel. Some of the tests are failing in parallel mode on a timeout, I think that's something to investigate as part of enabling parallel mode (outside of this PR).Checklist
👉 Read and sign the CLA (Contributor License Agreement) 👈
npm testpasses on your machinepackages/cliwere updatedexamples/*were updated👉 Check out how to submit a PR 👈