// ♓🌟 Piscēs ∷ value.test.js
// ====================================================================
//
-// Copyright © 2022 Lady [@ Lady’s Computer].
+// Copyright © 2022–2023 Lady [@ Lady’s Computer].
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
it,
} from "./dev-deps.js";
import {
+ ASYNC_ITERATOR,
+ HAS_INSTANCE,
+ IS_CONCAT_SPREADABLE,
+ ITERATOR,
+ MATCH,
+ MATCH_ALL,
NULL,
ordinaryToPrimitive,
+ REPLACE,
sameValue,
sameValueZero,
+ SPECIES,
+ SPLIT,
+ TO_PRIMITIVE,
+ TO_STRING_TAG,
toPrimitive,
type,
UNDEFINED,
+ UNSCOPABLES,
} from "./value.js";
+describe("ASYNC_ITERATOR", () => {
+ it("[[Get]] is @@asyncIterator", () => {
+ assertStrictEquals(ASYNC_ITERATOR, Symbol.asyncIterator);
+ });
+});
+
+describe("HAS_INSTANCE", () => {
+ it("[[Get]] is @@hasInstance", () => {
+ assertStrictEquals(HAS_INSTANCE, Symbol.hasInstance);
+ });
+});
+
+describe("IS_CONCAT_SPREADABLE", () => {
+ it("[[Get]] is @@isConcatSpreadable", () => {
+ assertStrictEquals(
+ IS_CONCAT_SPREADABLE,
+ Symbol.isConcatSpreadable,
+ );
+ });
+});
+
+describe("ITERATOR", () => {
+ it("[[Get]] is @@iterator", () => {
+ assertStrictEquals(ITERATOR, Symbol.iterator);
+ });
+});
+
+describe("MATCH", () => {
+ it("[[Get]] is @@match", () => {
+ assertStrictEquals(MATCH, Symbol.match);
+ });
+});
+
+describe("MATCH_ALL", () => {
+ it("[[Get]] is @@matchAll", () => {
+ assertStrictEquals(MATCH_ALL, Symbol.matchAll);
+ });
+});
+
describe("NULL", () => {
it("[[Get]] is null", () => {
assertStrictEquals(NULL, null);
});
});
+describe("REPLACE", () => {
+ it("[[Get]] is @@replace", () => {
+ assertStrictEquals(REPLACE, Symbol.replace);
+ });
+});
+
+describe("SPECIES", () => {
+ it("[[Get]] is @@species", () => {
+ assertStrictEquals(SPECIES, Symbol.species);
+ });
+});
+
+describe("SPLIT", () => {
+ it("[[Get]] is @@split", () => {
+ assertStrictEquals(SPLIT, Symbol.split);
+ });
+});
+
+describe("TO_PRIMITIVE", () => {
+ it("[[Get]] is @@toPrimitive", () => {
+ assertStrictEquals(TO_PRIMITIVE, Symbol.toPrimitive);
+ });
+});
+
+describe("TO_STRING_TAG", () => {
+ it("[[Get]] is @@toStringTag", () => {
+ assertStrictEquals(TO_STRING_TAG, Symbol.toStringTag);
+ });
+});
+
describe("UNDEFINED", () => {
it("[[Get]] is undefined", () => {
assertStrictEquals(UNDEFINED, void {});
});
});
+describe("UNSCOPABLES", () => {
+ it("[[Get]] is @@unscopables", () => {
+ assertStrictEquals(UNSCOPABLES, Symbol.unscopables);
+ });
+});
+
describe("ordinaryToPrimitive", () => {
it("[[Call]] prefers `valueOf` by default", () => {
const obj = {