From 904c50959b8cbc998d484813a0cc838d4ed6d051 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Mon, 20 Apr 2020 22:30:44 +0200 Subject: [PATCH] refactor(schematics): replace deprecated `TestBed.get` --- .../__name@dasherize__.effects.spec.ts.template | 2 +- .../__name@dasherize__.component.spec.ts.template | 2 +- .../__name@dasherize__.component.spec.ts.template | 2 +- .../__name@dasherize__.effects.spec.ts.template | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/effects/schematics/ng-add/files/__name@dasherize@if-flat__/__name@dasherize__.effects.spec.ts.template b/modules/effects/schematics/ng-add/files/__name@dasherize@if-flat__/__name@dasherize__.effects.spec.ts.template index 9235777793..d8e8ca2c61 100644 --- a/modules/effects/schematics/ng-add/files/__name@dasherize@if-flat__/__name@dasherize__.effects.spec.ts.template +++ b/modules/effects/schematics/ng-add/files/__name@dasherize@if-flat__/__name@dasherize__.effects.spec.ts.template @@ -16,7 +16,7 @@ describe('<%= classify(name) %>Effects', () => { ] }); - effects = TestBed.get<<%= classify(name) %>Effects>(<%= classify(name) %>Effects); + effects = TestBed.inject(<%= classify(name) %>Effects); }); it('should be created', () => { diff --git a/modules/schematics/src/container/files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template b/modules/schematics/src/container/files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template index 7f5054a8fa..d4501e713b 100644 --- a/modules/schematics/src/container/files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +++ b/modules/schematics/src/container/files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template @@ -20,7 +20,7 @@ describe('<%= classify(name) %>Component', () => { beforeEach(() => { fixture = TestBed.createComponent(<%= classify(name) %>Component); component = fixture.componentInstance; - store = TestBed.get(Store); + store = TestBed.inject(Store); fixture.detectChanges(); }); diff --git a/modules/schematics/src/container/integration-files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template b/modules/schematics/src/container/integration-files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template index 641495122e..878619ae2e 100644 --- a/modules/schematics/src/container/integration-files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +++ b/modules/schematics/src/container/integration-files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template @@ -20,7 +20,7 @@ describe('<%= classify(name) %>Component', () => { beforeEach(() => { fixture = TestBed.createComponent(<%= classify(name) %>Component); component = fixture.componentInstance; - store = TestBed.get(Store); + store = TestBed.inject(Store); spyOn(store, 'dispatch').and.callThrough(); fixture.detectChanges(); diff --git a/modules/schematics/src/effect/files/__name@dasherize@if-flat__/__name@dasherize__.effects.spec.ts.template b/modules/schematics/src/effect/files/__name@dasherize@if-flat__/__name@dasherize__.effects.spec.ts.template index f2742202f9..a478558a16 100644 --- a/modules/schematics/src/effect/files/__name@dasherize@if-flat__/__name@dasherize__.effects.spec.ts.template +++ b/modules/schematics/src/effect/files/__name@dasherize@if-flat__/__name@dasherize__.effects.spec.ts.template @@ -16,7 +16,7 @@ describe('<%= classify(name) %>Effects', () => { ] }); - effects = TestBed.get<<%= classify(name) %>Effects>(<%= classify(name) %>Effects); + effects = TestBed.inject(<%= classify(name) %>Effects); }); it('should be created', () => {