blob: b5b25cf1a58ca3f413e3be3ec8bf152e7e46272b [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
class DerivedPromise extends Promise {
static get [Symbol.species]() {
return Promise;
}
}
shouldBe(DerivedPromise.all([ 1, 2, 3]) instanceof DerivedPromise, true);
shouldBe(DerivedPromise.race([ 1, 2, 3]) instanceof DerivedPromise, true);