Fix `asyncTest` usage for `Promise.try` tests

This commit is contained in:
Sosuke Suzuki 2024-05-17 18:51:33 +09:00 committed by Ms2ger
parent 081808bebd
commit d4fac47d3b
2 changed files with 6 additions and 6 deletions

View File

@ -11,12 +11,12 @@ includes: [asyncHelpers.js, compareArray.js]
var sentinel = { sentinel: true };
asyncTest(
Promise.try(function () {
asyncTest(function () {
return Promise.try(function () {
assert.compareArray(
Array.prototype.slice.call(arguments),
[1, 2, Test262Error, sentinel]
);
}, 1, 2, Test262Error, sentinel)
);
});

View File

@ -11,11 +11,11 @@ includes: [asyncHelpers.js]
var sentinel = { sentinel: true };
asyncTest(
Promise.try(function () {
asyncTest(function() {
return Promise.try(function () {
return sentinel;
}).then(function (v) {
assert.sameValue(v, sentinel);
})
);
});