import { marbles } from 'rxjs-marbles/jest' import * as SUT from './App.epics' import { appSlice } from './App.slice' describe('App Epics', () => { describe('initAppEpic', () => { it( 'should return initAppSuccess action', marbles(m => { // given .. we have an initApp action const values: any = { a: appSlice.actions.initApp(), b: appSlice.actions.initAppSuccess(), } const action$ = m.cold('a', values) const expected = 'b' // when ... we init the app const destination$ = SUT.initAppEpic$(action$) // then... should return the expected actions m.expect(destination$).toBeObservable(expected, values) }), ) }) })