Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
describe(‘My Effects’, () => {
let effects: MyEffects;
let actions: Observable<any>;
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
MyEffects,
provideMockActions(() => actions),
// other providers
],
});
effects = TestBed.get(MyEffects);
});
it(‘should work’, () => {
actions = hot(‘—a-, { a: SomeAction,  … });
const expected = cold(‘—b’, { b: AnotherAction });
expect(effects.someSource$).toBeObservable(expected);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment