diff --git a/modules/effects/spec/actions.spec.ts b/modules/effects/spec/actions.spec.ts index 7cd1c4e9a0..d876fd0c82 100644 --- a/modules/effects/spec/actions.spec.ts +++ b/modules/effects/spec/actions.spec.ts @@ -3,14 +3,13 @@ import 'rxjs/add/operator/toArray'; import 'rxjs/add/operator/map'; import 'rxjs/add/observable/of'; import { ReflectiveInjector } from '@angular/core'; -import { Action, StoreModule, ActionsSubject } from '@ngrx/store'; - +import { Action, StoreModule, ScannedActionsSubject, ActionsSubject } from '@ngrx/store'; import { Actions } from '../src/actions'; describe('Actions', function() { let actions$: Actions; - let dispatcher: ActionsSubject; + let dispatcher: ScannedActionsSubject; const ADD = 'ADD'; const SUBTRACT = 'SUBTRACT'; @@ -33,10 +32,10 @@ describe('Actions', function() { ]); actions$ = injector.get(Actions); - dispatcher = injector.get(ActionsSubject); + dispatcher = injector.get(ScannedActionsSubject); }); - xit('should be an observable of actions', function() { + it('should be an observable of actions', function() { const actions = [ { type: ADD }, { type: SUBTRACT }, @@ -45,7 +44,6 @@ describe('Actions', function() { ]; let iterations = [ - { type: ActionsSubject.INIT }, ...actions ]; @@ -59,7 +57,7 @@ describe('Actions', function() { actions.forEach(action => dispatcher.next(action)); }); - xit('should let you filter out actions', function() { + it('should let you filter out actions', function() { const actions = [ ADD, ADD, SUBTRACT, ADD, SUBTRACT ]; const expected = actions.filter(type => type === ADD); diff --git a/modules/effects/src/actions.ts b/modules/effects/src/actions.ts index c82fd30b25..3712deccd8 100644 --- a/modules/effects/src/actions.ts +++ b/modules/effects/src/actions.ts @@ -1,7 +1,5 @@ -// TODO: This is a copy of this: https://github.com/redux-observable/redux-observable/blob/master/src/ActionsObservable.js -// Remove after this is resolved: https://github.com/redux-observable/redux-observable/issues/95 import { Injectable, Inject } from '@angular/core'; -import { Action, ActionsSubject } from '@ngrx/store'; +import { Action, ScannedActionsSubject } from '@ngrx/store'; import { Observable } from 'rxjs/Observable'; import { Operator } from 'rxjs/Operator'; import { filter } from 'rxjs/operator/filter'; @@ -9,7 +7,7 @@ import { filter } from 'rxjs/operator/filter'; @Injectable() export class Actions extends Observable { - constructor(@Inject(ActionsSubject) actionsSubject: Observable) { + constructor(@Inject(ScannedActionsSubject) actionsSubject: Observable) { super(); this.source = actionsSubject; } diff --git a/tests.js b/tests.js index b96b2cb723..bb1f80dbfa 100644 --- a/tests.js +++ b/tests.js @@ -17,7 +17,6 @@ require('zone.js/dist/jasmine-patch.js'); const { getTestBed } = require('@angular/core/testing'); const { ServerTestingModule, platformServerTesting } = require('@angular/platform-server/testing'); - getTestBed().initTestEnvironment(ServerTestingModule, platformServerTesting()); runner.loadConfig({ @@ -25,4 +24,4 @@ runner.loadConfig({ spec_files: [ '**/*.spec.ts' ] }); -runner.execute(); \ No newline at end of file +runner.execute();