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

afterAll swallows errors. #8531

Closed
ghost opened this issue Jun 4, 2019 · 2 comments
Closed

afterAll swallows errors. #8531

ghost opened this issue Jun 4, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 4, 2019

🐛 Bug Report

Error conditions in afterAll do not cause console output or suite failure in the same way as they do in beforeAll

To Reproduce

Steps to reproduce the behavior:

https://repl.it/@mmmmmrob/JestAfterAllError

  1. Create a test suite with an afterAll hook
  2. In the afterAll hook write some code that causes an error
  3. Run the tests and notice no error output

Expected behavior

The suite should fail and console output should show the error and stack trace, as it does for beforeAll hooks.

Link to repl or repo (highly encouraged)

repl.it demo

Issues without a reproduction link are likely to stall.

Run npx envinfo --preset jest

npx: installed 1 in 1.312s

  System:
    OS: Linux 4.9 Ubuntu 18.04.2 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 12.3.1 - /app/.heroku/node/bin/node
    Yarn: 1.12.3 - /app/.heroku/yarn/bin/yarn
    npm: 6.4.1 - /app/.heroku/node/bin/npm
  npmPackages:
    jest: >=23.6.0 => 24.8.0
@ghost
Copy link
Author

ghost commented Jun 4, 2019

Duplicate of #6692. Switching to jest-circus resolved for me.

@ghost ghost closed this as completed Jun 4, 2019
@github-actions
Copy link

github-actions bot commented Jun 2, 2021

This issue 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 Jun 2, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

0 participants