};
assertThrows(() => ordinaryToPrimitive(obj));
});
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(
+ ordinaryToPrimitive.name,
+ "ordinaryToPrimitive",
+ );
+ });
+ });
});
describe("sameValue", () => {
it("[[Call]] returns false for a primitive and its wrapped object", () => {
assertStrictEquals(sameValue(false, new Boolean(false)), false);
});
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(sameValue.name, "sameValue");
+ });
+ });
});
describe("sameValueZero", () => {
false,
);
});
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(sameValueZero.name, "sameValueZero");
+ });
+ });
});
describe("toPrimitive", () => {
assertThrows(() => toPrimitive(value2, "badhint"));
assertThrows(() => toPrimitive(true, "badhint"));
});
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(toPrimitive.name, "toPrimitive");
+ });
+ });
});
describe("type", () => {
it('[[Call]] returns "object" for constructable objects', () => {
assertStrictEquals(type(class {}), "object");
});
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(type.name, "type");
+ });
+ });
});