summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webidl/ecmascript-binding/builtin-function-properties.any.js
blob: 885bb441ead442e769e580e12d7b126f31c76a31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"use strict";

test(() => {
  const ownPropKeys = Reflect.ownKeys(Blob).slice(0, 3);
  assert_array_equals(ownPropKeys, ["length", "name", "prototype"]);
}, 'Constructor property enumeration order of "length", "name", and "prototype"');

test(() => {
  assert_own_property(Blob.prototype, "slice");

  const ownPropKeys = Reflect.ownKeys(Blob.prototype.slice).slice(0, 2);
  assert_array_equals(ownPropKeys, ["length", "name"]);
}, 'Method property enumeration order of "length" and "name"');

test(() => {
  assert_own_property(Blob.prototype, "size");

  const desc = Reflect.getOwnPropertyDescriptor(Blob.prototype, "size");
  assert_equals(typeof desc.get, "function");

  const ownPropKeys = Reflect.ownKeys(desc.get).slice(0, 2);
  assert_array_equals(ownPropKeys, ["length", "name"]);
}, 'Getter property enumeration order of "length" and "name"');