RxJSKoans
RxJSKoans copied to clipboard
Test 'LaunchingAnActionInTheFuture' does not fail when scheduler_delay > expectation_delay
Given the following, shouldn't the test fail if the scheduled code runs after the code that runs the assertion ? What is the reason for this behavior, if it's not a bug ?
var received = '';
var expectation_delay = 200;
var scheduler_delay = 500;
Rx
.Scheduler
.immediate
.schedule(function() { received = 'Finished'; }, scheduler_delay);
setTimeout(function() { equals(received, 'Finished'); start(); }, expectation_delay);