ctx-non-ctor.js (390B)
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);