2023-07-05 20:47:51 +02:00
|
|
|
// Copyright (C) 2023 Peter Klecha. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2023-07-18 16:19:14 +02:00
|
|
|
description: Promise.withResolvers produces instances of the receiver
|
2023-07-05 20:55:56 +02:00
|
|
|
esid: sec-promise.withresolvers
|
2024-05-02 00:27:31 +02:00
|
|
|
features: [promise-with-resolvers, class]
|
2023-07-05 20:47:51 +02:00
|
|
|
---*/
|
|
|
|
|
|
|
|
class SubPromise extends Promise {}
|
|
|
|
|
|
|
|
var instance = Promise.withResolvers.call(SubPromise);
|
|
|
|
|
|
|
|
assert.sameValue(instance.promise.constructor, SubPromise);
|
|
|
|
assert.sameValue(instance.promise instanceof SubPromise, true);
|
|
|
|
|