-
-
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
Include fullName in formattedAssertion #3378
Conversation
Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired. Before we can review or merge your code, we need you to email [email protected] with your details so we can update your status. |
Codecov Report
@@ Coverage Diff @@
## master #3378 +/- ##
=======================================
Coverage 64.89% 64.89%
=======================================
Files 176 176
Lines 6521 6521
Branches 4 4
=======================================
Hits 4232 4232
Misses 2288 2288
Partials 1 1
Continue to review full report at Codecov.
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
We actually have a lint rule in |
That seems kind of orthogonal to "including more information in the results" - also the whole point of "describe" is that the "it" can be generic, since the describe provides more context. |
Actually what's wrong with adding just one extra property? |
(To clarify; I'm saying that requiring "it"s to be unique makes no sense and runs counter to the entire point of BDD-style test frameworks like jasmine, jest, and mocha) |
You can have the same test name but not within the same describe block, of course.
…________________________________
From: Jordan Harband <[email protected]>
Sent: Friday, April 28, 2017 5:57:08 PM
To: facebook/jest
Cc: Christoph Pojer; State change
Subject: Re: [facebook/jest] Include fullName in formattedAssertion (#3378)
(To clarify; I'm saying that requiring "it"s to be unique makes no sense and runs counter to the entire point of BDD-style test frameworks like jasmine, jest, and mocha)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub<#3378 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAA0KGMIEgnWGrdofyksXr2DRdSRMY4jks5r0hpkgaJpZM4NJaVH>.
|
Ah, that makes much more sense. :-) In that case the linter rule seems very useful; but it'd still be useful to include this additional context in the output. Could it be reopened? |
Yes, if you send some tests for it :)
…________________________________
From: Jordan Harband <[email protected]>
Sent: Friday, April 28, 2017 6:23:57 PM
To: facebook/jest
Cc: Christoph Pojer; State change
Subject: Re: [facebook/jest] Include fullName in formattedAssertion (#3378)
Ah, that makes much more sense. :-)
In that case the linter rule seems very useful; but it'd still be useful to include this additional context in the output. Could it be reopened?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub<#3378 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAA0KC3D69g8Vi9IKKa_GlZ3xl5ICFCrks5r0iCtgaJpZM4NJaVH>.
|
I don't think the PR can be updated unless it's opened, and when a collaborator closes it, I don't think anyone but a collaborator can reopen it :-) how to solve this chicken and egg problem? :-p |
You just go and send a new PR. |
and if my coworker (the OP) wants to write the tests instead, they should send a new 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
This PR adds an additional field
fullName
toFormattedAssertionResult
.When we try to analyze the test result json, we find that two
it
test cases under differentdescribe
block in one test file are rendered the same in the json report. Including the full name help solving this issue.Test plan
The function I touched doesn't have a test. It was added here in #1988.
Sample json from my test run: