Created
December 23, 2017 00:36
-
-
Save erichulburd/94b6d9263991c02d7da68918e2f60b9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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