summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/NativeErrors/AggregateError/newtarget-is-undefined.js
blob: 3f02d5509e8a0b2ccabb91b888a6342c411346b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (C) 2020 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-aggregate-error
description: >
  NewTarget is undefined
info: |
  AggregateError ( errors, message )

  1. If NewTarget is undefined, let newTarget be the active function object, else let newTarget be NewTarget.

features: [AggregateError]
---*/

var obj = AggregateError([], '');

assert.sameValue(Object.getPrototypeOf(obj), AggregateError.prototype);
assert(obj instanceof AggregateError);

reportCompare(0, 0);