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
core: fix backup tests
Abdullah Atta846aae312ed5
diff --git a/packages/core/__tests__/backup.test.js b/packages/core/__tests__/backup.test.jsindex ab4bff8b8..f4f5e637a 100644--- a/packages/core/__tests__/backup.test.js+++ b/packages/core/__tests__/backup.test.js@@ -24,7 +24,10 @@ test("export backup", () =>notebookTest().then(async ({ db }) => {const id = await db.notes.add(TEST_NOTE);const exp = [];- for await (const file of db.backup.export("node", false)) {+ for await (const file of db.backup.export({+ type: "node",+ encrypt: false+ })) {exp.push(file);}@@ -49,7 +52,10 @@ test("export encrypted backup", () =>await db.notes.add(TEST_NOTE);const exp = [];- for await (const file of db.backup.export("node", true)) {+ for await (const file of db.backup.export({+ type: "node",+ encrypt: true+ })) {exp.push(file);}@@ -67,7 +73,10 @@ test("export encrypted backup", () =>test("import backup", async () => {const { db, id } = await notebookTest();const exp = [];- for await (const file of db.backup.export("node", false)) {+ for await (const file of db.backup.export({+ type: "node",+ encrypt: false+ })) {exp.push(file);}@@ -82,12 +91,15 @@ test("import encrypted backup", async () => {await db.notes.add(TEST_NOTE);const exp = [];- for await (const file of db.backup.export("node", true)) {+ for await (const file of db.backup.export({+ type: "node",+ encrypt: true+ })) {exp.push(file);}const db2 = await databaseTest();- await db2.backup.import(JSON.parse(exp[1].data), "password");+ await db2.backup.import(JSON.parse(exp[1].data), { password: "password" });expect((await db2.notebooks.notebook(id)).id).toBe(id);});@@ -96,7 +108,10 @@ test("import tempered backup", () =>await db.notes.add(TEST_NOTE);const exp = [];- for await (const file of db.backup.export("node", false)) {+ for await (const file of db.backup.export({+ type: "node",+ encrypt: false+ })) {exp.push(file);}