-
-
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
After hooks fired in an inconsistent order. #3268
Comments
gdborton
added a commit
to gdborton/jest
that referenced
this issue
Apr 10, 2017
…Each. It was discovered that afterAll hooks run in the same order that you add them, while afterEach hooks were running in reverse order. This commit makes their order consistent, and adds regression tests. Relevant issue - jestjs#3268
gdborton
added a commit
to gdborton/jest
that referenced
this issue
Apr 10, 2017
…Each. It was discovered that afterAll hooks run in the same order that you add them, while afterEach hooks were running in reverse order. This commit makes their order consistent, and adds regression tests. Relevant issue - jestjs#3268
gdborton
added a commit
to gdborton/jest
that referenced
this issue
Apr 10, 2017
…Each. It was discovered that afterAll hooks run in the same order that you add them, while afterEach hooks were running in reverse order. This commit makes their order consistent, and adds regression tests. Relevant issue - jestjs#3268
skovhus
pushed a commit
to skovhus/jest
that referenced
this issue
Apr 29, 2017
…Each. (jestjs#3275) It was discovered that afterAll hooks run in the same order that you add them, while afterEach hooks were running in reverse order. This commit makes their order consistent, and adds regression tests. Relevant issue - jestjs#3268
tushardhole
pushed a commit
to tushardhole/jest
that referenced
this issue
Aug 21, 2017
…Each. (jestjs#3275) It was discovered that afterAll hooks run in the same order that you add them, while afterEach hooks were running in reverse order. This commit makes their order consistent, and adds regression tests. Relevant issue - jestjs#3268
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
After hooks are run in an inconsistent order.
afterEach
hooks are run in reverse order, whileafterAll
hooks are run in the same order that they're added.If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can
yarn install
andyarn test
.See the output from the repl - https://repl.it/HAwZ
What is the expected behavior?
Personally I think that both
afterEach
andafterAll
should be running in the same order that they're originally added, but it doesn't matter which order they're run in to me as long as they're consistent.I see the same issue in Jasmine 2.5 in case you want to stay consistent -
jasmine/jasmine#1311
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
The text was updated successfully, but these errors were encountered: