not-a-constructor.js (498B)
1 // Copyright (C) 2024 Jordan Harband. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 description: > 6 Promise.try does not implement [[Construct]], is not new-able 7 includes: [isConstructor.js] 8 features: [Reflect.construct, promise-try] 9 ---*/ 10 11 assert.sameValue(isConstructor(Promise.try), false, 'isConstructor(Promise.all) must return false'); 12 13 assert.throws(TypeError, function () { 14 new Promise.try(function () {}); 15 }); 16 17 18 reportCompare(0, 0);