diff --git a/packages/common/test/directives/ng_switch_spec.ts b/packages/common/test/directives/ng_switch_spec.ts index 3adf2a1614..9d78c6f6d9 100644 --- a/packages/common/test/directives/ng_switch_spec.ts +++ b/packages/common/test/directives/ng_switch_spec.ts @@ -133,9 +133,7 @@ import {expect} from '@angular/platform-browser/testing/src/matchers'; ''; TestBed.configureTestingModule({declarations: [TestDirective]}); - TestBed.overrideComponent(TestComponent, {set: {template: template}}) - .createComponent(TestComponent); - const fixture = TestBed.createComponent(TestComponent); + const fixture = createTestComponent(template); fixture.componentInstance.switchValue = 'a'; fixture.detectChanges();