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 fix: do not access content directly
matt wilkiea1ff4bb13273
diff --git a/spec/services/import/single.spec.ts b/spec/services/import/single.spec.tsindex a4d3b9131f..9f9fa4ef5b 100644--- a/spec/services/import/single.spec.ts+++ b/spec/services/import/single.spec.ts@@ -134,8 +134,9 @@ describe('HTML Import', () => {const note = importSingle.importSingleFile(taskContext, file, parentNote);expect(note.title).toBe('Test Title');- expect(note.content).not.toContain('<script>');- expect(note.content).toContain('<p>Safe content</p>');+ const content = note.getContent();+ expect(content).not.toContain('<script>');+ expect(content).toContain('<p>Safe content</p>');});});});