diff --git a/tests/CRUD.js b/tests/CRUD.js index 5a99dd5..20eed02 100644 --- a/tests/CRUD.js +++ b/tests/CRUD.js @@ -16,6 +16,20 @@ describe("StormDB", function() { new StormDB(engine); }); + describe(".value()", function() { + it("should throw error on non-existant data", function() { + const engine = new StormDB.localFileEngine(exampleDBPath); + const db = new StormDB(engine); + + assert.throws(() => + db + .get("random123") + .get("random123") + .value() + ); + }); + }); + describe(".get()", function() { it("should successfully get values from database", function() { const engine = new StormDB.localFileEngine(exampleDBPath);