Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
astlaurent1 committed Apr 5, 2019
1 parent 6119191 commit ade44b4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/built-ins/Promise/allSettled/ctx-ctor-throws.js
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
});

0 comments on commit ade44b4

Please sign in to comment.