args.js (562B)
1 // |reftest| async 2 // Copyright (C) 2024 Jordan Harband. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 description: Promise.try forwards arguments 7 esid: sec-promise.try 8 features: [promise-try] 9 flags: [async] 10 includes: [asyncHelpers.js, compareArray.js] 11 ---*/ 12 13 var sentinel = { sentinel: true }; 14 15 asyncTest(function () { 16 return Promise.try(function () { 17 assert.compareArray( 18 Array.prototype.slice.call(arguments), 19 [1, 2, Test262Error, sentinel] 20 ); 21 }, 1, 2, Test262Error, sentinel) 22 });