• Sathya Gunasekaran's avatar
    [tests] Async test framework · 61ed6a00
    Sathya Gunasekaran authored
    - No need for multiple assertAsyncRan() calls, just do t.plan(count)
    
    - Previously, if you forget to call assertAsyncRan(), the test will still
      pass, which is no longer true.
    
    - No longer hold global state (with
      asyncAssertsExpected). Previously if one assert wasn't hit then
      there's no way to find out which test failed. You'd have to
      comment each test and try again.
    
    - Each test runs independently in the microtask queue.
    
    - Better failure reporting by printing the entire function.
    
    Example error :
    === mjsunit/harmony/promise-prototype-finally ===
    abort: Expected asserts: 2, Actual asserts: 1
    in test: reject/finally/then
    assert => {
      assert.plan(2);
      Promise.reject(3).finally().then(
        assert.unreachable,
        x => {
          assert.equals(3, x);
        });
    }
    
    
    Change-Id: Ic3f6272e1e87b8b0121b8c8c7cce19cf90d1f1be
    Reviewed-on: https://chromium-review.googlesource.com/455555
    Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
    Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
    Reviewed-by: 's avatarDaniel Ehrenberg <littledan@chromium.org>
    Reviewed-by: 's avatarCaitlin Potter <caitp@igalia.com>
    Cr-Commit-Position: refs/heads/master@{#46910}
    61ed6a00
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...