RxJSKoans icon indicating copy to clipboard operation
RxJSKoans copied to clipboard

Test 'LaunchingAnActionInTheFuture' does not fail when scheduler_delay > expectation_delay

Open deanrad opened this issue 11 years ago • 0 comments

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);

deanrad avatar Jul 10 '13 00:07 deanrad