summaryrefslogtreecommitdiff
path: root/src/database.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/database.test.ts')
-rw-r--r--src/database.test.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/database.test.ts b/src/database.test.ts
index de05b2c..4b296ba 100644
--- a/src/database.test.ts
+++ b/src/database.test.ts
@@ -49,6 +49,19 @@ describe("Database module", () => {
expect(s).toBe(toWrite);
});
+ test("it should write and read data from the root", async () => {
+ const toWrite = {
+ my: {
+ big: {
+ fun: "data"
+ }
+ }
+ };
+ await db.write("/", toWrite);
+ const s = await db.read("/");
+ expect(s).toEqual(toWrite);
+ });
+
test("it should remove data", async () => {
const path = "/this/is/fun";
await db.write(path, {