Jasmine–Setting the clock and deferring assertions
![](https://www.darchuk.net/wp-content/uploads/2018/09/pocket-watch-3156771_640.jpg)
Sometimes when you’re writing Javascript unit tests you have to give Javascript a chance to catch up before checking your assertions. Javascript uses a single event loop, so it isn’t multi-threaded in the same way as other languages. You can still get a “multi-threaded feel” by using callbacks (promises, observables, etc), but at the end … [Read more…]