Skip to content

Commit

Permalink
feat(schematics): change generate effect tests to use toBeObservable
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Feb 14, 2018
1 parent 125852d commit 222efe2
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {TestBed, async} from '@angular/core/testing';
import {StoreModule} from '@ngrx/store';
import {provideMockActions} from '@ngrx/effects/testing';
import {DataPersistence} from '@nrwl/nx';
import {readAll, hot} from '@nrwl/nx/testing';
import {hot} from '@nrwl/nx/testing';
import {<%= className %>Effects} from './<%= fileName %>.effects';

describe('<%= className %>Effects', () => {
Expand All @@ -25,11 +25,11 @@ describe('<%= className %>Effects', () => {
});

describe('someEffect', () => {
it('should work', async(async () => {
it('should work', () => {
actions = hot('-a-|', {a: {type: 'LOAD_DATA'}});
expect(await readAll(effects.loadData)).toEqual([
{type: 'DATA_LOADED', payload: {}}
]);
}));
expect(effects.loadData).toBeObservable(
hot('-a-|', {a: {type: 'DATA_LOADED', payload: {}}})
);
});
});
});

0 comments on commit 222efe2

Please sign in to comment.