This repo shows a few things of what to do and not to do when testing NgRx effects.
- Don't use
TestBed
unless you have to. Prefer instantiating effects directly. - Don't use
beforeEach
unless you have to. Prefer helper functions, so you can use "const" everywhere. - Don't use
.then
or.subscribe
in your tests. It makes them fragile. Observables are reified. Take advantage of this! Use TestScheduler when you can. Use async/await or fakeAsync zone everywhere else.