Debian Codegraph @

js/src/tests/test262/built-ins/Promise/withResolvers/ctx-non-ctor.js

raw
1 // Copyright (C) 2023 Peter Klecha. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 description: Promise.withResolvers errors when the receiver is not a constructor
6 esid: sec-promise.withresolvers
7 features: [promise-with-resolvers]
8 ---*/
9
10 assert.throws(TypeError, function() {
11 Promise.withResolvers.call(eval);
12 });
13
14 reportCompare(0, 0);