Skip to content

Instantly share code, notes, and snippets.

@cakeinpanic
Last active October 7, 2017 22:14
Show Gist options
  • Save cakeinpanic/131ecd376b2d73b736e79bf20812b4f5 to your computer and use it in GitHub Desktop.
Save cakeinpanic/131ecd376b2d73b736e79bf20812b4f5 to your computer and use it in GitHub Desktop.
gist for medium
it('someMethod would be ran with iterator each second', (done) => {
myService.someMethod();
setTimeout(() => {
expect(logger.logObservable).toHaveBeenCalledTimes(2);
expect(logger.logInterval).toHaveBeenCalledTimes(1);
done();
}, 2 * 1000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment