Skip to content

Commit

Permalink
test: using Injector instead of ReflectiveInjector (ngrx#1658) (ngrx#…
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoVogt authored and brandonroberts committed Mar 29, 2019
1 parent 10337f3 commit 78e237c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions modules/effects/spec/actions.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReflectiveInjector } from '@angular/core';
import { Injector } from '@angular/core';
import {
Action,
StoreModule,
Expand Down Expand Up @@ -37,9 +37,14 @@ describe('Actions', function() {
}

beforeEach(function() {
const injector = ReflectiveInjector.resolveAndCreate([
StoreModule.forRoot(reducer).providers || [],
Actions,
const injector = Injector.create([
{
provide: ScannedActionsSubject,
useClass: ScannedActionsSubject,
deps: [],
},
{ provide: ActionsSubject, useClass: ActionsSubject, deps: [] },
{ provide: Actions, useClass: Actions, deps: [ScannedActionsSubject] },
]);

actions$ = injector.get(Actions);
Expand Down
2 changes: 1 addition & 1 deletion modules/store/spec/store.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReflectiveInjector, InjectionToken } from '@angular/core';
import { InjectionToken } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { hot } from 'jasmine-marbles';
import {
Expand Down

0 comments on commit 78e237c

Please sign in to comment.