Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import { applyForce } from '../';
describe('applyForce epic', () => {
it('throttles and emits apply force if game ongoing', () => {
const testScheduler = new TestScheduler((actual, expected) => {
expect(actual).to.deep.equal(expected);
});
const action$ = new ActionsObservable(
testScheduler.createHotObservable('', {
// incoming actions
})
);
const store = {
getState: () => ({ /* some state */})
};
const test$ = applyForce(action$, store);
testScheduler.expectObservable(test$).toBe('', {
// actions epic emits
});
testScheduler.flush();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.