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
chore: add comments about all the tests that need to be added
thecodrr9ec5772cbef9
diff --git a/packages/core/api/database.js b/packages/core/api/database.jsindex 40f03981c..344d62739 100644--- a/packages/core/api/database.js+++ b/packages/core/api/database.js@@ -33,7 +33,7 @@ class Database {*/async addNote(note) {if (!note || !note.content || (!note.title && !note.content))- return undefined;+ return undefined; //TODO add testlet timestamp = note.dateCreated || Date.now();//add or update a note into the database@@ -108,6 +108,7 @@ class Database {const id = notebook.dateCreated || Date.now();let topics = {};if (notebook.topics) {+ //TODO add testfor (let topic of notebook.topics) {topics[topic] = [];}@@ -224,6 +225,7 @@ class Database {this.notes[notebookId] = notebook;return this.storage.write(KEYS.notebooks, this.notebooks);}+ //TODO add testreturn Promise.resolve();}@@ -235,7 +237,7 @@ class Database {async delete(items, key) {if (!items || items.length <= 0 || !this[key] || this[key].length <= 0)- return;+ return; //TODO add testfor (let item of items) {if (this[key].hasOwnProperty(item.dateCreated)) {delete this[key][item.dateCreated];diff --git a/packages/core/helpers/storage.js b/packages/core/helpers/storage.jsindex d58b44174..0ff4a5a09 100644--- a/packages/core/helpers/storage.js+++ b/packages/core/helpers/storage.js@@ -12,10 +12,10 @@ class Storage {return Convert.fromString(data);}clear() {- this.storage.clear();+ this.storage.clear(); //TODO add test}remove(key) {- this.storage.remove(key);+ this.storage.remove(key); //TODO add test}}diff --git a/packages/core/utils/convert.js b/packages/core/utils/convert.jsindex f900f093b..2ece7d329 100644--- a/packages/core/utils/convert.js+++ b/packages/core/utils/convert.js@@ -1,3 +1,4 @@+//TODO add testsexport default class Convert {static toString(input) {try {