]> Lady’s Gitweb - Pisces/blobdiff - numeric.test.js
Minor refactors to numeric.js
[Pisces] / numeric.test.js
index 0129ae335b9fff7d777e60b4e9ae2824f957d9dd..b6dbf0dddcb09c1b85c7a346b0e63013951a34ac 100644 (file)
@@ -1,11 +1,14 @@
-// ♓🌟 Piscēs ∷ numeric.test.js
-// ====================================================================
-//
-// 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
-// file, You can obtain one at <https://mozilla.org/MPL/2.0/>.
+// SPDX-FileCopyrightText: 2022, 2023, 2025 Lady <https://www.ladys.computer/about/#lady>
+// SPDX-License-Identifier: MPL-2.0
+/**
+ * ⁌ ♓🧩 Piscēs ∷ numeric.test.js
+ *
+ * Copyright © 2022–2023, 2025 Lady [@ Ladys 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
+ * file, You can obtain one at <https://mozilla.org/MPL/2.0/>.
+ */
 
 import {
   assert,
@@ -1351,6 +1354,22 @@ describe("toNumber", () => {
   it("[[Call]] converts to a number", () => {
     assertStrictEquals(toNumber(2n), 2);
   });
+
+  it("[[Construct]] throws an error", () => {
+    assertThrows(() => new toNumber(1));
+  });
+
+  describe(".length", () => {
+    it("[[Get]] returns the correct length", () => {
+      assertStrictEquals(toNumber.length, 1);
+    });
+  });
+
+  describe(".name", () => {
+    it("[[Get]] returns the correct name", () => {
+      assertStrictEquals(toNumber.name, "toNumber");
+    });
+  });
 });
 
 describe("toNumeric", () => {
This page took 0.24572 seconds and 4 git commands to generate.