From 1b0f7e7704843be7f4bd8e212da684a7b0b69f6a Mon Sep 17 00:00:00 2001 From: Jack Case Date: Thu, 11 Dec 2025 16:12:41 +0000 Subject: [PATCH] nest describes for version 1/version 2 DB --- spec/indexeddb_spec.js | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/spec/indexeddb_spec.js b/spec/indexeddb_spec.js index 6bf0274..a1b12cd 100644 --- a/spec/indexeddb_spec.js +++ b/spec/indexeddb_spec.js @@ -19,27 +19,33 @@ describe("SlopDB", () => { db.close() }) - it("creates a version 1 indexeddb", async () => { - const slopdb_v1 = new SlopDB(1) - await slopdb_v1.db_opened() - db = slopdb_v1.db + describe("version 1", () => { + it("creates a version 1 indexeddb", async () => { + const slopdb_v1 = new SlopDB(1) + await slopdb_v1.db_opened() + db = slopdb_v1.db - const object_stores = slopdb_v1.db.objectStoreNames - expect(object_stores).toContain("slop") - expect(object_stores).not.toContain("checkcache") + const object_stores = slopdb_v1.db.objectStoreNames + expect(object_stores).toContain("slop") + expect(object_stores).not.toContain("checkcache") - // slopdb_v1.db.close() + // slopdb_v1.db.close() + }) }) - it("creates a version 2 indexeddb", async () => { - const slopdb_v2 = new SlopDB(2) - await slopdb_v2.db_opened() - db = slopdb_v2.db + describe("version 2", () => { + it("creates a version 2 indexeddb", async () => { + const slopdb_v2 = new SlopDB(2) + await slopdb_v2.db_opened() + db = slopdb_v2.db - const object_stores = slopdb_v2.db.objectStoreNames - expect(object_stores).toContain("slop") - expect(object_stores).toContain("checkcache") + const object_stores = slopdb_v2.db.objectStoreNames + expect(object_stores).toContain("slop") + expect(object_stores).toContain("checkcache") - // slopdb_v2.db.close() + // slopdb_v2.db.close() + }) }) + + })