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

Legacy execution order #6100

Closed
wants to merge 2 commits into from
Closed

Conversation

niieani
Copy link
Contributor

@niieani niieani commented Apr 30, 2018

Summary

Fixes #6098

Summary

Facebook internally depended on undocumented execution order.

The order used to be less intuitive (IMO), as beforeAll scheduled inside of tests would go BEFORE the beforeAll scheduled inside the suite. It is now possible to restore that order by switching on the flag legacyExecutionOrder: true in jest's project configuration.

Keeping this undocumented on purpose.

Test plan

@mjesun added a test, I've added another one for the flag turned off.

…documented execution order

We do not set the currentDeclarationSuite upon node start in order to keep a legacy, undocumented ordering of beforeEach execution.
Specifically, this applies to beforeEach that were added inside of tests.
Facebook depends on this behavior internally (see jestjs#5964 for discussion)

Also: Added type of CreateOptions in jasmine_light

Added legacyExecutionOrder: false to DEFAULT_PROJECT_CONFIG

Updated test snapshots
@SimenB
Copy link
Member

SimenB commented May 21, 2018

Not needed after #6177

@SimenB SimenB closed this May 21, 2018
@github-actions
Copy link

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

Successfully merging this pull request may close these issues.

3 participants