mirror of https://github.com/tc39/test262.git
Wrap `throwsAsync` with `asyncTest`
This commit is contained in:
parent
d9c67327ca
commit
57c7d06bf1
|
@ -6,12 +6,15 @@ description: Promise.try returns a Promise that rejects when the function throws
|
||||||
esid: sec-promise.try
|
esid: sec-promise.try
|
||||||
features: [promise-try]
|
features: [promise-try]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.throwsAsync(
|
asyncTest(async function() {
|
||||||
Test262Error,
|
await assert.throwsAsync(
|
||||||
function () {
|
Test262Error,
|
||||||
Promise.try(function () { throw new Test262Error(); })
|
function () {
|
||||||
},
|
Promise.try(function () { throw new Test262Error(); })
|
||||||
"error thrown from callback must become a rejection"
|
},
|
||||||
);
|
"error thrown from callback must become a rejection"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue