Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
test(spec/search): fix expect error message printing
Panagiotis Papadopoulosc5d4df11a53d
diff --git a/spec/search/search.spec.ts b/spec/search/search.spec.tsindex df7749d2c5..7df796e011 100644--- a/spec/search/search.spec.ts+++ b/spec/search/search.spec.ts@@ -184,7 +184,7 @@ describe("Search", () => {function test(query: string, expectedResultCount: number) {const searchResults = searchService.findResultsWithQuery(query, searchContext);- expect(searchResults.length, `While searching for ${query} got unexpected result: [${searchResults.join(", ")}]`)+ expect(searchResults.length, `Searching for '${query}' unexpectedly returned ${Number(searchResults?.length)} instead of ${expectedResultCount} results. SearchResult: '${JSON.stringify(searchResults)}'`).toEqual(expectedResultCount);if (expectedResultCount === 1) {