-
-
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
Codeframe fixes #5094
Codeframe fixes #5094
Conversation
|
||
10 | | ||
11 | module.exports = (one: any, two: any) => { | ||
> 12 | expect(one).toEqual(two); |
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.
Potentially we can walk down the stack until we find the test file. But I think this makes more sense
The failing test is passing on my machine (mac, [email protected])... Ideas? Command I run: |
Also fix integration test which worked differently depending on if the test had been run before or not
Found the bug, hopefully green CI now |
Codecov Report
@@ Coverage Diff @@
## master #5094 +/- ##
==========================================
+ Coverage 60.58% 60.66% +0.07%
==========================================
Files 201 201
Lines 6686 6694 +8
Branches 4 4
==========================================
+ Hits 4051 4061 +10
+ Misses 2635 2633 -2
Continue to review full report at Codecov.
|
a30996e
to
620787c
Compare
.filter( | ||
line => | ||
!line.includes(`${path.sep}node_modules${path.sep}`) && | ||
!line.includes(`${path.sep}expect${path.sep}build${path.sep}`), |
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.
I think this second one is only needed in jest's own tests, as we resolve the symlink properly. In normal cases only node_modules
is needed
I love it. Thanks for working on this feature. |
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
Fixes a couple of issues with the new code frame.
In particular it fixes async assertions and having an
expect
in another file than the test file.I would like to fix async assertions to have a codeframe, but that can be done separately (currently it's not in the stack trace at all).
Test plan
Tests added