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

feat: allow providing ModuleTeardownOptions #499

Merged
merged 2 commits into from
Oct 23, 2021
Merged

feat: allow providing ModuleTeardownOptions #499

merged 2 commits into from
Oct 23, 2021

Conversation

arturovt
Copy link
Contributor

No description provided.

@@ -36,7 +37,8 @@ const defaultOptions: OptionalsRequired<BaseSpectatorOptions> = {
declarations: [],
imports: [],
schemas: [],
overrideModules: []
overrideModules: [],
teardown: { destroyAfterEach: true }
Copy link
Member

@NetanelBasal NetanelBasal Oct 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

I don't mind making it the default, but it should be considered a breaking change since we don't know the side effects it can cause.

Moreover, maybe we can use a global config flag to toggle this option globally.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make it as false since it's false by default in Angular 12, but it'll be true by default in 13?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

@NetanelBasal NetanelBasal merged commit 81edca6 into ngneat:master Oct 23, 2021
@arturovt arturovt deleted the feat/teardown branch October 23, 2021 17:58
@selangley-wa
Copy link

@arturovt
Since we are on Angular 13 now, should the newest versions of Spectator now default destroyAfterEach to true?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants