Skip to content

Commit c4a1054

Browse files
MikeRyanDevbrandonroberts
authored andcommitted
fix(build): Get tests running for each project
1 parent f86e2b4 commit c4a1054

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

modules/effects/spec/actions.spec.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ import 'rxjs/add/operator/toArray';
33
import 'rxjs/add/operator/map';
44
import 'rxjs/add/observable/of';
55
import { ReflectiveInjector } from '@angular/core';
6-
import { Action, StoreModule, ActionsSubject } from '@ngrx/store';
7-
6+
import { Action, StoreModule, ScannedActionsSubject, ActionsSubject } from '@ngrx/store';
87
import { Actions } from '../src/actions';
98

109

1110
describe('Actions', function() {
1211
let actions$: Actions;
13-
let dispatcher: ActionsSubject;
12+
let dispatcher: ScannedActionsSubject;
1413

1514
const ADD = 'ADD';
1615
const SUBTRACT = 'SUBTRACT';
@@ -33,10 +32,10 @@ describe('Actions', function() {
3332
]);
3433

3534
actions$ = injector.get(Actions);
36-
dispatcher = injector.get(ActionsSubject);
35+
dispatcher = injector.get(ScannedActionsSubject);
3736
});
3837

39-
xit('should be an observable of actions', function() {
38+
it('should be an observable of actions', function() {
4039
const actions = [
4140
{ type: ADD },
4241
{ type: SUBTRACT },
@@ -45,7 +44,6 @@ describe('Actions', function() {
4544
];
4645

4746
let iterations = [
48-
{ type: ActionsSubject.INIT },
4947
...actions
5048
];
5149

@@ -59,7 +57,7 @@ describe('Actions', function() {
5957
actions.forEach(action => dispatcher.next(action));
6058
});
6159

62-
xit('should let you filter out actions', function() {
60+
it('should let you filter out actions', function() {
6361
const actions = [ ADD, ADD, SUBTRACT, ADD, SUBTRACT ];
6462
const expected = actions.filter(type => type === ADD);
6563

modules/effects/src/actions.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
// TODO: This is a copy of this: https://github.com/redux-observable/redux-observable/blob/master/src/ActionsObservable.js
2-
// Remove after this is resolved: https://github.com/redux-observable/redux-observable/issues/95
31
import { Injectable, Inject } from '@angular/core';
4-
import { Action, ActionsSubject } from '@ngrx/store';
2+
import { Action, ScannedActionsSubject } from '@ngrx/store';
53
import { Observable } from 'rxjs/Observable';
64
import { Operator } from 'rxjs/Operator';
75
import { filter } from 'rxjs/operator/filter';
86

97

108
@Injectable()
119
export class Actions extends Observable<Action> {
12-
constructor(@Inject(ActionsSubject) actionsSubject: Observable<Action>) {
10+
constructor(@Inject(ScannedActionsSubject) actionsSubject: Observable<Action>) {
1311
super();
1412
this.source = actionsSubject;
1513
}

tests.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ require('zone.js/dist/jasmine-patch.js');
1717
const { getTestBed } = require('@angular/core/testing');
1818
const { ServerTestingModule, platformServerTesting } = require('@angular/platform-server/testing');
1919

20-
2120
getTestBed().initTestEnvironment(ServerTestingModule, platformServerTesting());
2221

2322
runner.loadConfig({
2423
spec_dir: 'spec',
2524
spec_files: [ '**/*.spec.ts' ]
2625
});
2726

28-
runner.execute();
27+
runner.execute();

0 commit comments

Comments
 (0)