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 1] Individual Test Case Report - Support custom messages #5

Closed
wants to merge 24 commits into from

Conversation

sauravhiremath
Copy link
Member

@sauravhiremath sauravhiremath commented Jun 15, 2020

Summary

PART 1 of 2

Aim: Support custom messages for jest worker
Fixes: #1
Ref: jestjs#9662

Note

It is an independent PR hence can be merged individually or can be stacked with other milestone PRs and merged together

Test plan

An extension from jestjs#9662

@sauravhiremath
Copy link
Member Author

sauravhiremath commented Jun 16, 2020

@jevakallio @kunal-kushwaha Could you try running yarn jest for this PR.

A single test case is always failing (in the CI build too). Any reasons why?

Test Result:

 yarn jest
yarn run v1.22.4
$ node ./packages/jest-cli/bin/jest.js
 FAIL  e2e/__tests__/customTestSequencers.test.ts (5.815 s)
   run prioritySequence first async

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      48 |     {},
      49 |   );
    > 50 |   expect(result.exitCode).toBe(0);
         |                           ^
      51 |   const sequence = extractSummary(result.stderr)
      52 |     .rest.replace(/PASS /g, '')
      53 |     .split('\n');

      at Object.toBe (e2e/__tests__/customTestSequencers.test.ts:50:27)

 

@kunal-kushwaha
Copy link
Member

@sauravhiremath: I'm also facing the same error 😕

@sauravhiremath
Copy link
Member Author

Ahh @kunal-kushwaha no worries. I just resolved the issue, had to add async for running test sort. I didn't know test sequencer had an option to be run in async too. It's fixed now

Push coming in a bit :)

@sauravhiremath
Copy link
Member Author

@jevakallio it works!! Could you have a look if any changes required?

@sauravhiremath sauravhiremath added this to To do in MLH x Jest Jun 17, 2020
@sauravhiremath sauravhiremath moved this from To do to Review in progress in MLH x Jest Jun 17, 2020
@jevakallio
Copy link

@sauravhiremath nice! 🎉 I ran out of time today, will review this tomorrow morning!

Copy link

@jevakallio jevakallio left a comment

Choose a reason for hiding this comment

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

@sauravhiremath I didn't review @rogeliog's commits because I have no context for them. I did review the cleanup commits you had made on top, and had some questions and notes on them.

Some comments I made were already changed in following commits you had made, so apologies if anything is redundant.

Overall, I'm seeing a lot of code style changes, but I don't understand why those changes were made? If they are to conform to Jest code standards or linter rules, that's good. But if not, the general advice I would have is not to change code for purely aesthetic reasons, unless there's a rationale for it.

@jevakallio jevakallio mentioned this pull request Jun 18, 2020
@sauravhiremath sauravhiremath changed the title [WIP] Feature/custom messages Feature/custom messages Jun 25, 2020
@sauravhiremath sauravhiremath changed the base branch from master to main/individual-test-cases July 20, 2020 19:20
@sauravhiremath sauravhiremath changed the base branch from main/individual-test-cases to master July 20, 2020 19:49
@sauravhiremath sauravhiremath changed the title Feature/custom messages [Part 1] Individual Test Case Report - Support custom messages Jul 20, 2020
@sauravhiremath
Copy link
Member Author

@kunal-kushwaha , you can make this PR to facebook upstream if you want!

@kunal-kushwaha
Copy link
Member

@sauravhiremath This looks great! Made one 🎉

@kunal-kushwaha
Copy link
Member

Merged into master via upstream 🎉

MLH x Jest automation moved this from Review in progress to Done Jul 21, 2020
@sauravhiremath sauravhiremath deleted the feature/custom-messages branch August 3, 2020 05:32
@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