forked from tc39/test262
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6119191
commit ade44b4
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (C) 2019 Alex St Laurent. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
description: > | ||
`Promise.allSettled` invoked on a constructor value that throws an error | ||
esid: #sec-promise.allSettled | ||
info: | | ||
Analogous to test/built-ins/Promise/all/ctx-ctor-throws.js | ||
---*/ | ||
|
||
const CustomPromise = function() { | ||
throw new Test262Error(); | ||
}; | ||
|
||
assert.throws(Test262Error, function() { | ||
// Promise.allSettled.call(CustomPromise); // fails on promise.allsettled shim | ||
Promise.allSettled.call(CustomPromise, []); // shim tries to iterate before running C | ||
}); |