Skip to content

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

core: update note-storage mock for tests

Abdullah Atta339c5a357b6e
diff --git a/packages/core/__mocks__/node-storage.mock.js b/packages/core/__mocks__/node-storage.mock.js
index 087a07375..2e0f1d4cf 100644
--- a/packages/core/__mocks__/node-storage.mock.js
+++ b/packages/core/__mocks__/node-storage.mock.js
@@ -62,8 +62,7 @@ export class NodeStorageInterface {
async decrypt(key, cipherData) {
cipherData.format = "base64";
- const result = await this.crypto.decrypt(key, cipherData);
- if (typeof result.data === "string") return result.data;
+ return await this.crypto.decrypt(key, cipherData, "text");
}
async deriveCryptoKey(name, { password, salt }) {