blob: 18cd5a3a6d5b2c0c009cd406ddb40f0b514b3c86 (
plain)
1
2
3
4
5
6
7
8
9
10
|
ignoreUnhandledRejections();
const global = newGlobal();
const OtherPromise = global.Promise;
class SubPromise extends OtherPromise {}
assertEq(true, new SubPromise(()=>{}) instanceof OtherPromise);
assertEq(true, SubPromise.resolve({}) instanceof OtherPromise);
assertEq(true, SubPromise.reject({}) instanceof OtherPromise);
assertEq(true, SubPromise.resolve({}).then(()=>{}, ()=>{}) instanceof OtherPromise);
|