Add TestBed module teardown
Recipe ID
org.openrewrite.angular.migration.add-testbed-teardownArtifact@openrewrite/recipes-angularAdds { teardown: { destroyAfterEach: true } } as the third argument to TestBed.initTestEnvironment() calls. Angular 13 changed the default teardown behavior, and this ensures explicit opt-in for module teardown after each test.
Single recipeProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.angular.migration.add-testbed-teardownIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-angular