You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a way of setting the config to the "project's default" per project, but we might need burrito to reset it to default before it does in projects.
What do we achieve with this?
Because these config properties that aren't set in the project's default won't be reset if are configured in a specific test, making all the tests inheriting this config that might not be necessary or might even cause inconsistencies.
We tried to fix it by doing this, but in the end we found out that we didn't understood the problem well. What happens is that we set the project config for burrito in the jest's setupFilesAfterEnv, which we thought was being applied before each test but instead is applied before each test file. This means the first test of every test file is gonna have the configuration reset but the following tests are gonna be inheriting the state of the config of the previous tests.
In order to fully fix it, we would need to stop using jest's setupFilesAfterEnv to set the burrito's config for our projects and add a mechanism to burrito so that projects using it could add its custom config and it is applied before each test.
The text was updated successfully, but these errors were encountered:
We have a way of setting the config to the "project's default" per project, but we might need burrito to reset it to default before it does in projects.
What do we achieve with this?
Because these config properties that aren't set in the project's default won't be reset if are configured in a specific test, making all the tests inheriting this config that might not be necessary or might even cause inconsistencies.
We tried to fix it by doing this, but in the end we found out that we didn't understood the problem well. What happens is that we set the project config for burrito in the jest's setupFilesAfterEnv, which we thought was being applied before each test but instead is applied before each test file. This means the first test of every test file is gonna have the configuration reset but the following tests are gonna be inheriting the state of the config of the previous tests.
In order to fully fix it, we would need to stop using jest's setupFilesAfterEnv to set the burrito's config for our projects and add a mechanism to burrito so that projects using it could add its custom config and it is applied before each test.
The text was updated successfully, but these errors were encountered: