Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

test: fix notebook test

thecodrrd36c48c5d0ae
diff --git a/packages/core/__tests__/notebooks.test.js b/packages/core/__tests__/notebooks.test.js
index 8322461b9..88e4bbdbf 100644
--- a/packages/core/__tests__/notebooks.test.js
+++ b/packages/core/__tests__/notebooks.test.js
@@ -50,21 +50,3 @@ test("unpin a notebook", () =>
notebook = db.notebooks.notebook(id);
expect(notebook.data.pinned).toBe(false);
}));
-
-test("delete a notebook", () =>
- notebookTest().then(async ({ db, id }) => {
- let noteId = await db.notes.add(TEST_NOTE);
- await db.notebooks.notebook(id).topics.topic("General").add(noteId);
- expect(db.notebooks.notebook(id).topics.topic("General").has(noteId)).toBe(
- true
- );
- let note = db.notes.note(noteId);
-
- expect(note.notebooks.some((n) => n.id === id)).toBe(true);
-
- await db.notebooks.delete(id);
- expect(db.notebooks.notebook(id).data.deleted).toBe(true);
- note = db.notes.note(noteId);
-
- expect(note.notebooks.length).toBe(0);
- }));
diff --git a/packages/core/__tests__/trash.test.js b/packages/core/__tests__/trash.test.js
index 562261ff3..8e352f839 100644
--- a/packages/core/__tests__/trash.test.js
+++ b/packages/core/__tests__/trash.test.js
@@ -91,7 +91,7 @@ test("delete a notebook", () =>
let noteId = await db.notes.add(TEST_NOTE);
await db.notebooks.notebook(id).topics.topic("General").add(noteId);
await db.notebooks.delete(id);
- expect(db.notebooks.notebook(id).data.deleted).toBe(true);
+ expect(db.notebooks.notebook(id)).toBeUndefined();
expect(db.notes.note(noteId).notebook).toBeUndefined();
}));