mirror of
https://github.com/tc39/test262.git
synced 2025-05-09 09:20:30 +02:00
24 lines
795 B
JavaScript
24 lines
795 B
JavaScript
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
esid: sec-ecmascript-standard-built-in-objects
|
|
description: >
|
|
Number.parseFloat does not implement [[Construct]]
|
|
info: |
|
|
ECMAScript Function Objects
|
|
|
|
Built-in function objects that are not identified as constructors do not
|
|
implement the [[Construct]] internal method unless otherwise specified in
|
|
the description of a particular function.
|
|
includes: [isConstructor.js]
|
|
features: [Reflect.construct, arrow-function]
|
|
---*/
|
|
|
|
assert.sameValue(isConstructor(Number.parseFloat), false, 'isConstructor(Number.parseFloat) must return false');
|
|
|
|
assert.throws(TypeError, () => {
|
|
new Number.parseFloat();
|
|
}, '`new Number.parseFloat()` throws TypeError');
|
|
|