Skip to content

Instantly share code, notes, and snippets.

@adrianfaciu
Created August 28, 2017 15:43
Show Gist options
  • Save adrianfaciu/61045a4e89e960974b2a84e39bb8dff3 to your computer and use it in GitHub Desktop.
Save adrianfaciu/61045a4e89e960974b2a84e39bb8dff3 to your computer and use it in GitHub Desktop.
it('can fetch data with debounce (mocking debounce)', () => {
const source = cold('a', { a: { type: actions.DATA_WITH_DEBOUNCE_FETCH } });
mockObservable();
const effect = new AppTimeEffect(new Actions(source));
const expected = cold('a', { a: { type: actions.DATA_WITH_DEBOUNCE_FETCH_SUCCESS } });
expect(effect.fetchDataWithDebounce$).toBeObservable(expected);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment