From 1cb00bca0d5a3cd5767f6df25b8ba8febb3489cf Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Wed, 6 Sep 2023 17:00:04 +0500 Subject: [PATCH] core: fix collector tests --- .../core/src/api/sync/__tests__/collector.test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core/src/api/sync/__tests__/collector.test.js b/packages/core/src/api/sync/__tests__/collector.test.js index 729d5861b..7cfba8c85 100644 --- a/packages/core/src/api/sync/__tests__/collector.test.js +++ b/packages/core/src/api/sync/__tests__/collector.test.js @@ -41,10 +41,10 @@ test("newly created note should get included in collector", () => } expect(items).toHaveLength(2); - expect(items[0].items[0].id).toBe(noteId); - expect(items[0].type).toBe("note"); - expect(items[1].type).toBe("content"); - expect(items[1].items[0].id).toBe(db.notes.note(noteId).data.contentId); + expect(items[0].type).toBe("content"); + expect(items[0].items[0].id).toBe(db.notes.note(noteId).data.contentId); + expect(items[1].items[0].id).toBe(noteId); + expect(items[1].type).toBe("note"); })); test("edited note after last synced time should get included in collector", () => @@ -103,6 +103,6 @@ test("localOnly note should get included as a deleted item in collector", () => expect(items[0].items[0].length).toBe(104); expect(items[1].items[0].length).toBe(104); - expect(items[0].type).toBe("note"); - expect(items[1].type).toBe("content"); + expect(items[0].type).toBe("content"); + expect(items[1].type).toBe("note"); }));