Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 20 additions & 17 deletions test/built-ins/JSON/isRawJSON/builtin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,48 @@
/*---
esid: sec-json.israwjson
description: >
JSON.isRawJSON meets the requirements for built-in objects
JSON.isRawJSON meets the requirements for standard built-in objects
info: |
JSON.isRawJSON ( O )

18 ECMAScript Standard Built-in Objects
ECMAScript Standard Built-in Objects
...
Unless specified otherwise, a built-in object that is callable as a function
is a built-in function object with the characteristics described in 10.3.
Unless specified otherwise, the [[Extensible]] internal slot of a built-in
object initially has the value true. Every built-in function object has a
[[Realm]] internal slot whose value is the Realm Record of the realm for
which the object was initially created.
object initially has the value true.
...
Unless otherwise specified every built-in function and every built-in
constructor has the Function prototype object, which is the initial value of
the expression Function.prototype (20.2.3), as the value of its [[Prototype]]
internal slot.
...
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.
Built-in function objects that are not constructors do not have a "prototype"
property unless otherwise specified in the description of a particular
function.
...
Each built-in function defined in this specification is created by calling the
CreateBuiltinFunction abstract operation (10.3.4). The values of the length
and name parameters are the initial values of the "length" and "name"
properties as discussed below. The values of the prefix parameter are
similarly discussed below.

includes: [propertyHelper.js]
features: [json-parse-with-source]
---*/

assert(Object.isExtensible(JSON.isRawJSON), "JSON.isRawJSON is extensible");
assert.sameValue(
typeof JSON.isRawJSON,
'function',
'The value of `typeof JSON.isRawJSON` is "function"'
Object.isExtensible(JSON.isRawJSON),
Object.isExtensible(Object.prototype),
"JSON.isRawJSON extensibility matches Object.prototype",
);

assert.sameValue(
Object.getPrototypeOf(JSON.isRawJSON),
Function.prototype,
'Object.getPrototypeOf(JSON.isRawJSON) must return the value of "Function.prototype"'
"JSON.isRawJSON [[Prototype]] is Function.prototype"
);

assert.sameValue(
Object.getOwnPropertyDescriptor(JSON.isRawJSON, "prototype"),
undefined,
"JSON.isRawJSON has no own prototype property"
);

verifyPrimordialCallableProperty(JSON, "isRawJSON", "isRawJSON", 1);
27 changes: 0 additions & 27 deletions test/built-ins/JSON/isRawJSON/length.js

This file was deleted.

40 changes: 0 additions & 40 deletions test/built-ins/JSON/isRawJSON/name.js

This file was deleted.

25 changes: 0 additions & 25 deletions test/built-ins/JSON/isRawJSON/prop-desc.js

This file was deleted.

This file was deleted.

Loading