X-Git-Url: https://git.ladys.computer/Etiquette/blobdiff_plain/ce40db353c27887f4345c88fc70a7251bf688bbb..f8903c5b3bd12d02af174e5043d906d63da0b0d1:/memory.test.js?ds=sidebyside diff --git a/memory.test.js b/memory.test.js index 8187635..397a4c4 100644 --- a/memory.test.js +++ b/memory.test.js @@ -1,11 +1,14 @@ -// 📧🏷️ Étiquette ∷ memory.test.js -// ==================================================================== -// -// Copyright © 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 . +// SPDX-FileCopyrightText: 2023, 2025 Lady +// SPDX-License-Identifier: MPL-2.0 +/** + * ⁌ 📧🏷️ Étiquette ∷ memory.test.js + * + * Copyright © 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 . + */ import { assert, @@ -40,6 +43,12 @@ class Storable { } describe("Storage", () => { + it("[[Call]] throws", () => { + assertThrows(() => { + Storage(); + }); + }); + it("[[Construct]] creates a new Storage", () => { assertStrictEquals( Object.getPrototypeOf(new Storage()), @@ -155,7 +164,7 @@ describe("Storage", () => { assertStrictEquals(instance.has("000-0000"), false); instance.set("000-0000", new Storable()); assertStrictEquals(instance.has("000-0000"), true); - instance.delete("000-0000") + instance.delete("000-0000"); assertStrictEquals(instance.has("000-0000"), false); }); @@ -191,7 +200,7 @@ describe("Storage", () => { const data = { my: "data" }; const storable = new Storable(data); instance.set(newID, storable); - data.my = "new data" + data.my = "new data"; instance.set(newID, storable); assertEquals(instance.get(newID).data, data); });