| // Copyright (C) 2016 the V8 project authors. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| esid: sec-reflect.construct |
| description: Value when invoked via `Reflect.construct` |
| 2. If newTarget is not present, let newTarget be target. |
| 5. Return ? Construct(target, args, newTarget). |
| var customNewTarget = function() {}; |
| Reflect.construct(f, []); |
| assert.sameValue(newTarget, f, 'NewTarget unspecified'); |
| Reflect.construct(f, [], customNewTarget); |
| assert.sameValue(newTarget, customNewTarget, 'NewTarget explicitly defined'); |