Jasmine–Setting the clock and deferring assertions
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…]