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: Add additional context for failed test
Elian Doran9dc22264f4eb
diff --git a/spec/search/search.spec.ts b/spec/search/search.spec.tsindex df2b0d13e6..4d8a06abae 100644--- a/spec/search/search.spec.ts+++ b/spec/search/search.spec.ts@@ -202,7 +202,9 @@ describe('Search', () => {function test(query: string, expectedResultCount: number) {const searchResults = searchService.findResultsWithQuery(query, searchContext);- expect(searchResults.length).toEqual(expectedResultCount);+ expect(searchResults.length)+ .withContext(`While searching for ${query} got unexpected result: [${searchResults.join(", ")}]`)+ .toEqual(expectedResultCount);if (expectedResultCount === 1) {expect(becca_mocking.findNoteByTitle(searchResults, 'My note')).toBeTruthy();