mirror of https://github.com/tc39/test262.git
21 lines
512 B
JavaScript
21 lines
512 B
JavaScript
// Copyright (C) 2019 Leo Balter. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
description: >
|
|
Promise.allSettled invoked on a non-constructor value
|
|
esid: sec-promise.allsettled
|
|
info: |
|
|
...
|
|
3. Let promiseCapability be ? NewPromiseCapability(C).
|
|
|
|
NewPromiseCapability ( C )
|
|
|
|
1. If IsConstructor(C) is false, throw a TypeError exception.
|
|
features: [Promise.allSettled]
|
|
---*/
|
|
|
|
assert.throws(TypeError, function() {
|
|
Promise.allSettled.call(eval);
|
|
});
|