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
|
||||
features: [promise-try]
|
||||
flags: [async]
|
||||
includes: [asyncHelpers.js]
|
||||
---*/
|
||||
|
||||
assert.throwsAsync(
|
||||
Test262Error,
|
||||
function () {
|
||||
Promise.try(function () { throw new Test262Error(); })
|
||||
},
|
||||
"error thrown from callback must become a rejection"
|
||||
);
|
||||
asyncTest(async function() {
|
||||
await assert.throwsAsync(
|
||||
Test262Error,
|
||||
function () {
|
||||
Promise.try(function () { throw new Test262Error(); })
|
||||
},
|
||||
"error thrown from callback must become a rejection"
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue