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

fix: include path to test file in "after teardown" error #11885

Merged
merged 6 commits into from Sep 20, 2021

Conversation

@SimenB
Copy link
Collaborator

@SimenB SimenB commented Sep 20, 2021

Summary

The logging can happen long after the test has been printed as PASS to the user, so let's include the test file in the message to make it easier to track down (not super useful in sync situations as the stack trace should include it, but that doesn't happen in async contexts)

Test plan

Green CI

@codecov-commenter
Copy link

@codecov-commenter codecov-commenter commented Sep 20, 2021

Codecov Report

Merging #11885 (3f00726) into main (7c4ea24) will decrease coverage by 0.06%.
The diff coverage is 10.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #11885      +/-   ##
==========================================
- Coverage   68.93%   68.87%   -0.07%     
==========================================
  Files         312      312              
  Lines       16414    16432      +18     
  Branches     4761     4768       +7     
==========================================
+ Hits        11315    11317       +2     
- Misses       5072     5088      +16     
  Partials       27       27              
Impacted Files Coverage Δ
packages/jest-runner/src/runTest.ts 3.47% <0.00%> (ø)
packages/jest-runtime/src/index.ts 56.44% <10.52%> (-0.98%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c4ea24...3f00726. Read the comment docs.

@SimenB SimenB merged commit 31cad20 into facebook:main Sep 20, 2021
30 checks passed
@SimenB SimenB deleted the include-test-in-error branch Sep 20, 2021
AndrewSouthpaw added a commit to AndrewSouthpaw/jest that referenced this issue Sep 23, 2021
…nsform-ignore-patterns

* 'main' of https://github.com/facebook/jest: (38 commits)
  chore: update `npm` instructions in README (facebook#11890)
  chore: force patched version of ansi-regex (facebook#11889)
  chore: update lockfile after publish
  v27.2.1
  chore: update changelog for release
  make the syntax error message more helpful for TS users (facebook#11807)
  fix: include path to test file in "after teardown" error (facebook#11885)
  docs: add link to the typescript integration instructions (facebook#11806)
  fix: properly return mocks when using jest.isolatedModules (facebook#11882)
  chore: remove node version pinning from CI (facebook#11866)
  chore: remove node 13 as condition in some tests (facebook#11880)
  chore: fix typo in docs
  chore: update lockfile after publish
  v27.2.0
  chore: roll new website version
  chore: update changelog for release
  chore: update lock
  feat: support `conditions` from test environments (facebook#11863)
  Revert "chore: remove unneeded yarn patch for react native (facebook#11853)"
  chore: supress experimental warnings in tests
  ...
@github-actions
Copy link

@github-actions github-actions bot commented Oct 21, 2021

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 Oct 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants