-
Notifications
You must be signed in to change notification settings - Fork 780
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
Share 'before' hook test environment with child module #1328
Comments
This is a practical issue that would be resolved by implementing #869. |
I've confirmed https://codepen.io/Krinkle/pen/JjXJgoz Changing this is imho considered a breaking change, but a good one to make in the 3.0 release. |
TODO: Figure out how we can help users prepare for this ahead of the QUnit 3.0 release so that any difference in behaviour can be smoothened out and warned for. |
The before and after hooks run once per module as long as there is at least one test in the module. Using environment inheritance allows us to use the module context in those hooks, which allows reading the expected changes to the context from a before hook inside nested modules. Fixes qunitjs#1328. Ref qunitjs#869.
The before and after hooks run once per module as long as there is at least one test in the module. Using environment inheritance allows us to use the module context in those hooks, which allows reading the expected changes to the context from a before hook inside nested modules. Fixes qunitjs#1328. Ref qunitjs#869.
The before and after hooks run once per module as long as there is at least one test in the module. Using environment inheritance allows us to use the module context in those hooks, which allows reading the expected changes to the context from a before hook inside nested modules. Fixes qunitjs#1328. Ref qunitjs#869.
The before and after hooks run once per module as long as there is at least one test in the module. Using environment inheritance allows us to use the module context in those hooks, which allows reading the expected changes to the context from a before hook inside nested modules. Fixes qunitjs#1328. Ref qunitjs#869.
The before and after hooks run once per module as long as there is at least one test in the module. Using environment inheritance allows us to use the module context in those hooks, which allows reading the expected changes to the context from a before hook inside nested modules. Fixes qunitjs#1328. Ref qunitjs#869.
The before and after hooks run once per module as long as there is at least one test in the module. Using environment inheritance allows us to use the module context in those hooks, which allows reading the expected changes to the context from a before hook inside nested modules. Fixes qunitjs#1328. Ref qunitjs#869.
The before and after hooks run once per module as long as there is at least one test in the module. Using environment inheritance allows us to use the module context in those hooks, which allows reading the expected changes to the context from a before hook inside nested modules. Once before hooks have run, create a flattened deep copy of the module testEnvironment and assign that to test testEnvironment. At this point nothing should use test.testEnvironment until the before hooks have run. Fixes qunitjs#1328. Ref qunitjs#869.
Tell us about your runtime:
What are you trying to do?
What did you expect to happen?
Expecting nested child modules to share test environment with parent module.
What actually happened?
Nested child module have it's own test environment object.
The text was updated successfully, but these errors were encountered: