-// 📧🏷️ É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 <https://mozilla.org/MPL/2.0/>.
+// SPDX-FileCopyrightText: 2023, 2025 Lady <https://www.ladys.computer/about/#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 <https://mozilla.org/MPL/2.0/>.
+ */
import {
assert,
}
describe("Storage", () => {
+ it("[[Call]] throws", () => {
+ assertThrows(() => {
+ Storage();
+ });
+ });
+
it("[[Construct]] creates a new Storage", () => {
assertStrictEquals(
Object.getPrototypeOf(new 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);
});
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);
});