A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
test: fix collector test
thecodrrdb324b6b87f3
diff --git a/packages/core/api/sync/__tests__/collector.test.js b/packages/core/api/sync/__tests__/collector.test.jsindex 7a84bbd37..28a3ed753 100644--- a/packages/core/api/sync/__tests__/collector.test.js+++ b/packages/core/api/sync/__tests__/collector.test.js@@ -19,7 +19,7 @@ test("newly created note should get included in collector", () =>const noteId = await db.notes.add(TEST_NOTE);const data = await collector.collect(lastSyncedTime);- const notes = data.items.filter((i) => i.type === "note");+ const notes = data.items.filter((i) => i.collectionId === "note");expect(notes).toHaveLength(1);expect(notes[0].id).toBe(noteId);@@ -37,7 +37,7 @@ test("edited note after last synced time should get included in collector", () =await db.notes.add({ id: noteId, pinned: true });const data = await collector.collect(lastSyncedTime);- const notes = data.items.filter((i) => i.type === "note");+ const notes = data.items.filter((i) => i.collectionId === "note");expect(notes).toHaveLength(1);expect(notes[0].id).toBe(noteId);@@ -55,7 +55,7 @@ test("note edited before last synced time should not get included in collector",const lastSyncedTime = Date.now();const data = await collector.collect(lastSyncedTime);- const notes = data.items.filter((i) => i.type === "note");+ const notes = data.items.filter((i) => i.collectionId === "note");expect(notes).toHaveLength(0);}));@@ -66,7 +66,7 @@ test("localOnly note should get included as a deleted item in collector", () =>await db.notes.add({ ...TEST_NOTE, localOnly: true });const data = await collector.collect(0);- const notes = data.items.filter((i) => i.type === "note");+ const notes = data.items.filter((i) => i.collectionId === "note");expect(notes).toHaveLength(1);expect(notes[0].deleted).toBe(true);}));