Skip to content
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

[Part 2] Individual Test Case Report - Report progress of individual test cases #6

Closed
wants to merge 54 commits into from

Conversation

kunal-kushwaha
Copy link
Member

@kunal-kushwaha kunal-kushwaha commented Jun 15, 2020

Summary

Part 2 of 2

Aim: Report progress of individual test cases (this is the final milestone PR)
Reference: jestjs#9001
Fixes: jestjs#6616 #1

Breakdowns:

Test plan

  • Add custom message support in jest-worker
  • Using event handler for parallel workers
  • Update onCustomMessage functions to pass tests (caused by updating its Type)
  • Get on Fixes recommended
  • Add Tests
  • Update documentation

implementation-demo

Update so far:

Running JEST_CIRCUS=1 yarn jest should increment atomic tests and not batch update them as it did before.

TODO

  • Write more e2e tests
  • Update Documentation
  • Figure out why this test is failing:
    To Reproduce: $ JEST_CIRCUS=1 yarn test-leak
    Test suite failed to run

    EXPERIMENTAL FEATURE!
    Your test suite is leaking memory. Please ensure all references are cleaned.

    There is a number of things that can leak memory:
      - Async operations that have not finished (e.g. fs.readFile).
      - Timers not properly mocked (e.g. setInterval, setTimeout).
      - Keeping references to the global scope.

      at onResult (packages/jest-core/build/TestScheduler.js:190:18)
          at Array.map (<anonymous>)

@kunal-kushwaha kunal-kushwaha marked this pull request as draft June 21, 2020 20:30
@kunal-kushwaha kunal-kushwaha marked this pull request as ready for review June 23, 2020 17:44
@kunal-kushwaha
Copy link
Member Author

kunal-kushwaha commented Jun 23, 2020

@SimenB, @jevakallio: Review is requested and suggestions on changes to be made if any. There's just 1 e2e test failing but rest of the things are working as expected.

Running JEST_CIRCUS=1 yarn jest should increment atomic tests and not batch update them like it did before.

Copy link
Collaborator

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really shaping up, great work!

.gitignore Outdated Show resolved Hide resolved
packages/jest-circus/src/testCaseReportHandler.ts Outdated Show resolved Hide resolved
packages/jest-runner/src/runTest.ts Outdated Show resolved Hide resolved
packages/jest-runner/src/testWorker.ts Outdated Show resolved Hide resolved
packages/jest-runner/src/types.ts Outdated Show resolved Hide resolved
packages/jest-worker/src/Farm.ts Outdated Show resolved Hide resolved
packages/jest-worker/src/Farm.ts Outdated Show resolved Hide resolved
@kunal-kushwaha
Copy link
Member Author

Reference: jestjs#10227

@kunal-kushwaha
Copy link
Member Author

Merged into master and rebased the fork 🎉

MLH x Jest automation moved this from Review in progress to Done Jul 30, 2020
@SimenB SimenB deleted the per-test-report branch December 23, 2020 17:46
@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
MLH x Jest
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants