Skip to content

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

core: remove `titleOnly` lookup tests

Abdullah Attac9704e103122
diff --git a/packages/core/__tests__/lookup.test.js b/packages/core/__tests__/lookup.test.js
index 138ce8929..14a5a6587 100644
--- a/packages/core/__tests__/lookup.test.js
+++ b/packages/core/__tests__/lookup.test.js
@@ -81,22 +81,6 @@ test("search notes with an empty note", () =>
expect(filtered).toHaveLength(1);
}));
-test("search notes with opts.titleOnly should not search in descriptions", () =>
- noteTest({
- content: content
- }).then(async ({ db }) => {
- await db.notes.add({
- title: "note of the world",
- content: { type: "tiptap", data: "<p>hello<br></p>" }
- });
- let filtered = await db.lookup
- .notes("note of the world", undefined, {
- titleOnly: true
- })
- .ids();
- expect(filtered).toHaveLength(1);
- }));
-
test("search notebooks", () =>
notebookTest().then(async ({ db }) => {
await db.notebooks.add(TEST_NOTEBOOK2);
@@ -104,16 +88,6 @@ test("search notebooks", () =>
expect(filtered.length).toBeGreaterThan(0);
}));
-test("search notebook with titleOnly option should not search in descriptions", () =>
- notebookTest().then(async ({ db }) => {
- await db.notebooks.add({ title: "Description" });
- await db.notebooks.add(TEST_NOTEBOOK2);
- let filtered = await db.lookup
- .notebooks("Description", { titleOnly: true })
- .ids();
- expect(filtered).toHaveLength(1);
- }));
-
test("search should not return trashed notes", () =>
databaseTest().then(async (db) => {
const id = await db.notes.add({
@@ -152,22 +126,3 @@ test("search reminders", () =>
const descriptionSearch = await db.lookup.reminders("please do").ids();
expect(descriptionSearch).toHaveLength(1);
}));
-
-test("search reminders with titleOnly option should not search in descriptions", () =>
- databaseTest().then(async (db) => {
- await db.reminders.add({
- title: "idc",
- description: "desc",
- date: Date.now()
- });
- await db.reminders.add({
- title: "remind me",
- description: "idc",
- date: Date.now()
- });
-
- const filtered = await db.lookup
- .reminders("idc", { titleOnly: true })
- .ids();
- expect(filtered).toHaveLength(1);
- }));