Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Reflect/Reflect.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 26.1
5 description: >
6 The Reflect object is an ordinary object.
7 info: |
8 26.1 The Reflect Object
9
10 The Reflect object is the %Reflect% intrinsic object and the initial value of
11 the Reflect property of the global object. The Reflect object is an ordinary
12 object.
13
14 The Reflect object is not a function object. It does not have a [[Construct]]
15 internal method; it is not possible to use the Reflect object as a constructor
16 with the new operator. The Reflect object also does not have a [[Call]]
17 internal method; it is not possible to invoke the Reflect object as a
18 function.
19 ---*/
20
21 assert.sameValue(typeof Reflect, 'object', '`typeof Reflect` is `"object"`');
22
23 // Reflect is not callable
24 assert.throws(TypeError, function() {
25 Reflect();
26 });
27
28 // Reflect doesn't have a constructor
29 assert.throws(TypeError, function() {
30 new Reflect();
31 });