+describe("LazyLoader", () => {
+ const symbol = Symbol("foo");
+ const prototype = {};
+ const etaoinMethod = spy(() => "success");
+ const shrdluMethod = spy(() => "success");
+ const cmfwypMethod = spy(() => "success");
+ const vbgkqjMethod = spy(() => "success");
+ const methodsObject = Object.create(
+ prototype,
+ {
+ etaoin: {
+ configurable: false,
+ enumerable: true,
+ value: etaoinMethod,
+ writable: false,
+ },
+ shrdlu: {
+ configurable: true,
+ enumerable: false,
+ value: shrdluMethod,
+ writable: false,
+ },
+ cmfwyp: {
+ configurable: true,
+ enumerable: false,
+ get() {
+ return cmfwypMethod;
+ },
+ },
+ vbgkqj: {
+ configurable: false,
+ enumerable: true,
+ get() {
+ return vbgkqjMethod;
+ },
+ set(_) {},
+ },
+ xzfiflffffi: { configurable: true, enumerable: false, set(_) {} },
+ [symbol]: {
+ configurable: true,
+ enumerable: false,
+ value: "failure",
+ writable: true,
+ },
+ },
+ );
+
+ it("[[Call]] throws an error", () => {
+ assertThrows(() => LazyLoader({}));
+ });
+
+ it("[[Construct]] creates a new object which inherits from the correct prototype", () => {
+ assertStrictEquals(
+ Object.getPrototypeOf(new LazyLoader(methodsObject)),
+ prototype,
+ );
+ });
+
+ it("[[Construct]] creates a new object with the desired properties", () => {
+ assertEquals(
+ Reflect.ownKeys(new LazyLoader(methodsObject)),
+ ["etaoin", "shrdlu", "cmfwyp", "vbgkqj", "xzfiflffffi", symbol],
+ );
+ });
+
+ it("[[Construct]] creates a new object with configurable properties", () => {
+ assertEquals(
+ Object.fromEntries(
+ function* (ll) {
+ for (const key of Reflect.ownKeys(ll)) {
+ yield [
+ key,
+ Object.getOwnPropertyDescriptor(ll, key).configurable,
+ ];
+ }
+ }(new LazyLoader(methodsObject)),
+ ),
+ {
+ etaoin: true,
+ shrdlu: true,
+ cmfwyp: true,
+ vbgkqj: true,
+ xzfiflffffi: true,
+ [symbol]: true,
+ },
+ );
+ });
+
+ it("[[Construct]] creates a new object with the correct enumerability", () => {
+ assertEquals(
+ Object.fromEntries(
+ function* (ll) {
+ for (const key of Reflect.ownKeys(ll)) {
+ yield [
+ key,
+ Object.getOwnPropertyDescriptor(ll, key).enumerable,
+ ];
+ }
+ }(new LazyLoader(methodsObject)),
+ ),
+ {
+ etaoin: true,
+ shrdlu: false,
+ cmfwyp: false,
+ vbgkqj: true,
+ xzfiflffffi: false,
+ [symbol]: false,
+ },
+ );
+ });
+
+ it("[[Construct]] creates a new object with defined getters", () => {
+ assertEquals(
+ Object.fromEntries(
+ function* (ll) {
+ for (const key of Reflect.ownKeys(ll)) {
+ yield [
+ key,
+ Object.getOwnPropertyDescriptor(ll, key).get?.name,
+ ];
+ }
+ }(new LazyLoader(methodsObject)),
+ ),
+ {
+ etaoin: "get etaoin",
+ shrdlu: "get shrdlu",
+ cmfwyp: "get cmfwyp",
+ vbgkqj: "get vbgkqj",
+ xzfiflffffi: "get xzfiflffffi",
+ [symbol]: `get [${symbol.description}]`,
+ },
+ );
+ });
+
+ it("[[Construct]] creates a new object with defined setters for writable properties only", () => {
+ assertEquals(
+ Object.fromEntries(
+ function* (ll) {
+ for (const key of Reflect.ownKeys(ll)) {
+ yield [
+ key,
+ Object.getOwnPropertyDescriptor(ll, key).set?.name,
+ ];
+ }
+ }(new LazyLoader(methodsObject)),
+ ),
+ {
+ etaoin: undefined,
+ shrdlu: undefined,
+ cmfwyp: undefined,
+ vbgkqj: undefined,
+ xzfiflffffi: undefined,
+ [symbol]: `set [${symbol.description}]`,
+ },
+ );
+ });
+
+ it("[[Construct]] creates a new object with correct getter behaviour", () => {
+ const ll = new LazyLoader(methodsObject);
+ ll.etaoin;
+ assertEquals(
+ Object.getOwnPropertyDescriptor(ll, "etaoin"),
+ {
+ configurable: false,
+ enumerable: true,
+ value: "success",
+ writable: false,
+ },
+ );
+ assertSpyCalls(etaoinMethod, 1);
+ assertSpyCall(etaoinMethod, 0, {
+ args: [],
+ self: ll,
+ returned: "success",
+ });
+ ll.shrdlu;
+ assertEquals(
+ Object.getOwnPropertyDescriptor(ll, "shrdlu"),
+ {
+ configurable: true,
+ enumerable: false,
+ value: "success",
+ writable: false,
+ },
+ );
+ assertSpyCalls(shrdluMethod, 1);
+ assertSpyCall(shrdluMethod, 0, {
+ args: [],
+ self: ll,
+ returned: "success",
+ });
+ ll.cmfwyp;
+ assertEquals(
+ Object.getOwnPropertyDescriptor(ll, "cmfwyp"),
+ {
+ configurable: true,
+ enumerable: false,
+ value: "success",
+ writable: false,
+ },
+ );
+ assertSpyCalls(cmfwypMethod, 1);
+ assertSpyCall(cmfwypMethod, 0, {
+ args: [],
+ self: ll,
+ returned: "success",
+ });
+ ll.vbgkqj;
+ assertEquals(
+ Object.getOwnPropertyDescriptor(ll, "vbgkqj"),
+ {
+ configurable: false,
+ enumerable: true,
+ value: "success",
+ writable: false,
+ },
+ );
+ assertSpyCalls(vbgkqjMethod, 1);
+ assertSpyCall(vbgkqjMethod, 0, {
+ args: [],
+ self: ll,
+ returned: "success",
+ });
+ assertThrows(() => ll.xzfiflffffi);
+ assertThrows(() => ll[symbol]);
+ });
+
+ it("[[Construct]] creates a new object with correct setter behaviour", () => {
+ const ll = new LazyLoader(methodsObject);
+ ll[symbol] = "success";
+ assertEquals(
+ Object.getOwnPropertyDescriptor(ll, symbol),
+ {
+ configurable: true,
+ enumerable: false,
+ value: "success",
+ writable: true,
+ },
+ );
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(LazyLoader.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(LazyLoader.name, "LazyLoader");
+ });
+ });
+});
+
+describe("defineOwnDataProperty", () => {
+ it("[[Call]] defines the property", () => {
+ const obj = {};
+ defineOwnDataProperty(obj, "etaoin", "success");
+ assert(Object.hasOwn(obj, "etaoin"));
+ assertStrictEquals(obj.etaoin, "success");
+ });
+
+ it("[[Call]] defines a configurable, enumerable, writable property", () => {
+ const obj = {};
+ defineOwnDataProperty(obj, "etaoin", "success");
+ assertEquals(
+ Object.getOwnPropertyDescriptor(obj, "etaoin"),
+ {
+ configurable: true,
+ enumerable: true,
+ value: "success",
+ writable: true,
+ },
+ );
+ });
+
+ it("[[Call]] returns the provided object", () => {
+ const obj = {};
+ assertStrictEquals(
+ defineOwnDataProperty(obj, "etaoin", null),
+ obj,
+ );
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new defineOwnDataProperty(obj, "etaoin", null));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(defineOwnDataProperty.length, 3);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(
+ defineOwnDataProperty.name,
+ "defineOwnDataProperty",
+ );
+ });
+ });
+});
+
+describe("defineOwnNonenumerableDataProperty", () => {
+ it("[[Call]] defines the property", () => {
+ const obj = {};
+ defineOwnNonenumerableDataProperty(obj, "etaoin", "success");
+ assert(Object.hasOwn(obj, "etaoin"));
+ assertStrictEquals(obj.etaoin, "success");
+ });
+
+ it("[[Call]] defines a configurable, non·enumerable, writable property", () => {
+ const obj = {};
+ defineOwnNonenumerableDataProperty(obj, "etaoin", "success");
+ assertEquals(
+ Object.getOwnPropertyDescriptor(obj, "etaoin"),
+ {
+ configurable: true,
+ enumerable: false,
+ value: "success",
+ writable: true,
+ },
+ );
+ });
+
+ it("[[Call]] returns the provided object", () => {
+ const obj = {};
+ assertStrictEquals(
+ defineOwnNonenumerableDataProperty(obj, "etaoin", null),
+ obj,
+ );
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() =>
+ new defineOwnNonenumerableDataProperty(obj, "etaoin", null)
+ );
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(defineOwnNonenumerableDataProperty.length, 3);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(
+ defineOwnNonenumerableDataProperty.name,
+ "defineOwnNonenumerableDataProperty",
+ );
+ });
+ });
+});
+
+describe("defineOwnProperty", () => {
+ it("[[Call]] defines the property", () => {
+ const obj = {};
+ defineOwnProperty(obj, "etaoin", {});
+ assert(Object.hasOwn(obj, "etaoin"));
+ });
+
+ it("[[Call]] returns the provided object", () => {
+ const obj = {};
+ assertStrictEquals(defineOwnProperty(obj, "etaoin", {}), obj);
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new defineOwnProperty(obj, "etaoin", {}));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(defineOwnProperty.length, 3);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(
+ defineOwnProperty.name,
+ "defineOwnProperty",
+ );
+ });
+ });
+});
+
+describe("defineOwnProperties", () => {
+ it("[[Call]] defines properties from the provided objects", () => {
+ const obj = {};
+ defineOwnProperties(obj, {
+ etaoin: {},
+ shrdlu: {},
+ }, { cmfwyp: {} });
+ assert("etaoin" in obj);
+ assert("shrdlu" in obj);
+ assert("cmfwyp" in obj);
+ });
+
+ it("[[Call]] overrides earlier declarations with later ones", () => {
+ const obj = { etaoin: undefined };
+ defineOwnProperties(obj, {
+ etaoin: { value: "failure" },
+ }, {
+ etaoin: { value: "success" },
+ });
+ assertStrictEquals(obj.etaoin, "success");
+ });
+
+ it("[[Call]] returns the provided object", () => {
+ const obj = {};
+ assertStrictEquals(defineOwnProperties(obj), obj);
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new defineOwnProperties({}));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(defineOwnProperties.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(
+ defineOwnProperties.name,
+ "defineOwnProperties",
+ );
+ });
+ });
+});
+
+describe("deleteOwnProperty", () => {
+ it("[[Call]] deletes the provided property on the provided object", () => {
+ const obj = { failure: undefined };
+ deleteOwnProperty(obj, "failure");
+ assert(!("failure" in obj));
+ });
+
+ it("[[Call]] does nothing if the property doesn’t exist", () => {
+ const obj = Object.freeze({});
+ deleteOwnProperty(obj, "failure");
+ assert(!("failure" in obj));
+ });
+
+ it("[[Call]] throws if the property can’t be deleted", () => {
+ const obj = Object.seal({ failure: undefined });
+ assertThrows(() => deleteOwnProperty(obj, "failure"));
+ });
+
+ it("[[Call]] returns the provided object", () => {
+ const obj = {};
+ assertStrictEquals(deleteOwnProperty(obj, ""), obj);
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new deleteOwnProperty({}, ""));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(deleteOwnProperty.length, 2);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(deleteOwnProperty.name, "deleteOwnProperty");
+ });
+ });
+});
+
+describe("freeze", () => {
+ it("[[Call]] freezes the object", () => {
+ const obj = {};
+ freeze(obj);
+ assert(Object.isFrozen(obj));
+ });
+
+ it("[[Call]] returns the provided object", () => {
+ const obj = {};
+ assertStrictEquals(freeze(obj), obj);
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new freeze({}));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(freeze.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(freeze.name, "freeze");
+ });
+ });
+});
+
+describe("frozenCopy", () => {
+ it("[[Call]] returns a frozen object", () => {
+ assert(
+ Object.isFrozen(
+ frozenCopy(Object.create(null), {
+ data: {
+ configurable: true,
+ enumerable: true,
+ value: undefined,
+ writable: true,
+ },
+ accessor: {
+ configurable: true,
+ enumerable: true,
+ get: undefined,
+ },
+ }),
+ ),
+ );
+ });
+
+ it("[[Call]] ignores non·enumerable properties", () => {
+ assertEquals(
+ frozenCopy(
+ Object.create(null, {
+ data: { value: undefined },
+ accessor: { get: undefined },
+ }),
+ ),
+ {},
+ );
+ });
+
+ it("[[Call]] preserves accessor properties", () => {
+ const properties = {
+ both: {
+ configurable: false,
+ enumerable: true,
+ get: () => {},
+ set: (_) => {},
+ },
+ empty: {
+ configurable: false,
+ enumerable: true,
+ get: undefined,
+ set: undefined,
+ },
+ getter: {
+ configurable: false,
+ enumerable: true,
+ get: () => {},
+ set: undefined,
+ },
+ setter: {
+ configurable: false,
+ enumerable: true,
+ get: undefined,
+ set: (_) => {},
+ },
+ };
+ assertEquals(
+ Object.getOwnPropertyDescriptors(
+ frozenCopy(Object.create(null, properties)),
+ ),
+ properties,
+ );
+ });
+
+ it("[[Call]] preserves data properties", () => {
+ const properties = {
+ implied: {
+ configurable: false,
+ enumerable: true,
+ },
+ writable: {
+ configurable: false,
+ enumerable: true,
+ value: "etaoin",
+ writable: true,
+ },
+ nonwritable: {
+ configurable: false,
+ enumerable: true,
+ value: "shrdlu",
+ writable: false,
+ },
+ };
+ assertEquals(
+ Object.getOwnPropertyDescriptors(
+ frozenCopy(Object.create(null, properties)),
+ ),
+ {
+ implied: {
+ ...properties.implied,
+ value: undefined,
+ writable: false,
+ },
+ writable: { ...properties.writable, writable: false },
+ nonwritable: properties.nonwritable,
+ },
+ );
+ });
+
+ it("[[Call]] does not copy properties on the prototype", () => {
+ assert(
+ !("failure" in
+ frozenCopy(Object.create({ failure: undefined }))),
+ );
+ });
+
+ it("[[Call]] uses the species of the constructor", () => {
+ const species = { prototype: {} };
+ assertStrictEquals(
+ Object.getPrototypeOf(
+ frozenCopy({}, { [Symbol.species]: species }),
+ ),
+ species.prototype,
+ );
+ });
+
+ it("[[Call]] uses constructor if no species is defined", () => {
+ const constructor = { [Symbol.species]: null, prototype: {} };
+ assertStrictEquals(
+ Object.getPrototypeOf(frozenCopy({}, constructor)),
+ constructor.prototype,
+ );
+ });
+
+ it("[[Call]] uses the constructor on the object if none is provided", () => {
+ const constructor = { [Symbol.species]: null, prototype: {} };
+ assertStrictEquals(
+ Object.getPrototypeOf(frozenCopy({ constructor })),
+ constructor.prototype,
+ );
+ });
+
+ it("[[Call]] allows a null constructor", () => {
+ assertStrictEquals(
+ Object.getPrototypeOf(frozenCopy({}, null)),
+ null,
+ );
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new frozenCopy({}));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(frozenCopy.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(frozenCopy.name, "frozenCopy");
+ });
+ });
+});
+
+describe("getMethod", () => {
+ it("[[Call]] gets a method", () => {
+ const method = () => {};
+ assertStrictEquals(getMethod({ method }, "method"), method);
+ });
+
+ it("[[Call]] works for values coercible to objects", () => {
+ assertEquals(getMethod("", "toString"), String.prototype.toString);
+ });
+
+ it("[[Call]] throws for null and undefined", () => {
+ assertThrows(() => getMethod(null, "valueOf"));
+ assertThrows(() => getMethod(undefined, "valueOf"));
+ });
+
+ it("[[Call]] throws if the resulting value isn’t callable", () => {
+ assertThrows(() => getMethod({ "failure": true }, "failure"));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new getMethod({ method() {} }, "method"));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(getMethod.length, 2);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(getMethod.name, "getMethod");
+ });
+ });
+});
+
+describe("getOwnPropertyDescriptor", () => {
+ it("[[Call]] gets the descriptor", () => {
+ assertEquals(
+ getOwnPropertyDescriptor({ success: true }, "success"),
+ {
+ configurable: true,
+ enumerable: true,
+ value: true,
+ writable: true,
+ },
+ );
+ });
+
+ it("[[Call]] returns undefined for non‐own properties", () => {
+ assertStrictEquals(
+ getOwnPropertyDescriptor({}, "valueOf"),
+ undefined,
+ );
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new getOwnPropertyDescriptor({}, ""));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(getOwnPropertyDescriptor.length, 2);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(
+ getOwnPropertyDescriptor.name,
+ "getOwnPropertyDescriptor",
+ );
+ });
+ });
+});
+
+describe("getOwnPropertyDescriptors", () => {
+ it("[[Call]] gets the descriptors", () => {
+ assertEquals(
+ getOwnPropertyDescriptors({ success: true, etaoin: "shrdlu" }),
+ {
+ success: {
+ configurable: true,
+ enumerable: true,
+ value: true,
+ writable: true,
+ },
+ etaoin: {
+ configurable: true,
+ enumerable: true,
+ value: "shrdlu",
+ writable: true,
+ },
+ },
+ );
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new getOwnPropertyDescriptors({}));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(getOwnPropertyDescriptors.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(
+ getOwnPropertyDescriptors.name,
+ "getOwnPropertyDescriptors",
+ );
+ });
+ });
+});
+
+describe("getOwnPropertyKeys", () => {
+ it("[[Call]] gets own (but not inherited) property keys", () => {
+ assertEquals(getOwnPropertyKeys({ success: true }), ["success"]);
+ });
+
+ it("[[Call]] works for values coercible to objects", () => {
+ assertEquals(getOwnPropertyKeys("foo"), ["0", "1", "2", "length"]);
+ });
+
+ it("[[Call]] throws for null and undefined", () => {
+ assertThrows(() => getOwnPropertyKeys(null));
+ assertThrows(() => getOwnPropertyKeys(undefined));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new getOwnPropertyKeys({}));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(getOwnPropertyKeys.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(
+ getOwnPropertyKeys.name,
+ "getOwnPropertyKeys",
+ );
+ });
+ });
+});
+
+describe("getOwnPropertyStrings", () => {
+ it("[[Call]] gets own string keys", () => {
+ assertEquals(getOwnPropertyStrings({ success: true }), [
+ "success",
+ ]);
+ });
+
+ it("[[Call]] works for values coercible to objects", () => {
+ assertEquals(getOwnPropertyStrings("foo"), [
+ "0",
+ "1",
+ "2",
+ "length",
+ ]);
+ });
+
+ it("[[Call]] throws for null and undefined", () => {
+ assertThrows(() => getOwnPropertyStrings(null));
+ assertThrows(() => getOwnPropertyStrings(undefined));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new getOwnPropertyStrings({}));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(getOwnPropertyStrings.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(
+ getOwnPropertyStrings.name,
+ "getOwnPropertyStrings",
+ );
+ });
+ });
+});
+
+describe("getOwnPropertySymbols", () => {
+ it("[[Call]] gets own symbol keys", () => {
+ const sym = Symbol();
+ assertEquals(getOwnPropertySymbols({ [sym]: true }), [sym]);
+ });
+
+ it("[[Call]] works for values coercible to objects", () => {
+ assertEquals(getOwnPropertySymbols("foo"), []);
+ });
+
+ it("[[Call]] throws for null and undefined", () => {
+ assertThrows(() => getOwnPropertySymbols(null));
+ assertThrows(() => getOwnPropertySymbols(undefined));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new getOwnPropertySymbols({}));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(getOwnPropertySymbols.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(
+ getOwnPropertySymbols.name,
+ "getOwnPropertySymbols",
+ );
+ });
+ });
+});
+
+describe("getPropertyValue", () => {
+ it("[[Call]] gets property values on the provided object", () => {
+ assertStrictEquals(
+ getPropertyValue({ success: true }, "success"),
+ true,
+ );
+ });
+
+ it("[[Call]] works for values coercible to objects", () => {