mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
fulltext now ignores archived notes like it used to in the old implementation
This commit is contained in:
@@ -27,8 +27,9 @@ describe("Parser", () => {
|
||||
parsingContext: new ParsingContext({includeNoteContent: false})
|
||||
});
|
||||
|
||||
expect(rootExp.constructor.name).toEqual("NoteCacheFlatTextExp");
|
||||
expect(rootExp.tokens).toEqual(["hello", "hi"]);
|
||||
expect(rootExp.constructor.name).toEqual("AndExp");
|
||||
expect(rootExp.subExpressions[0].constructor.name).toEqual("NoteCacheFlatTextExp");
|
||||
expect(rootExp.subExpressions[0].tokens).toEqual(["hello", "hi"]);
|
||||
});
|
||||
|
||||
it("fulltext parser with content", () => {
|
||||
@@ -38,8 +39,11 @@ describe("Parser", () => {
|
||||
parsingContext: new ParsingContext({includeNoteContent: true})
|
||||
});
|
||||
|
||||
expect(rootExp.constructor.name).toEqual("OrExp");
|
||||
const subs = rootExp.subExpressions;
|
||||
expect(rootExp.constructor.name).toEqual("AndExp");
|
||||
expect(rootExp.subExpressions[0].constructor.name).toEqual("OrExp");
|
||||
expect(rootExp.subExpressions[1].constructor.name).toEqual("PropertyComparisonExp");
|
||||
|
||||
const subs = rootExp.subExpressions[0].subExpressions;
|
||||
|
||||
expect(subs[0].constructor.name).toEqual("NoteCacheFlatTextExp");
|
||||
expect(subs[0].tokens).toEqual(["hello", "hi"]);
|
||||
@@ -149,8 +153,9 @@ describe("Parser", () => {
|
||||
expect(rootExp.constructor.name).toEqual("AndExp");
|
||||
const [firstSub, secondSub] = rootExp.subExpressions;
|
||||
|
||||
expect(firstSub.constructor.name).toEqual("NoteCacheFlatTextExp");
|
||||
expect(firstSub.tokens).toEqual(["hello"]);
|
||||
expect(firstSub.constructor.name).toEqual("AndExp");
|
||||
expect(firstSub.subExpressions[0].constructor.name).toEqual("NoteCacheFlatTextExp");
|
||||
expect(firstSub.subExpressions[0].tokens).toEqual(["hello"]);
|
||||
|
||||
expect(secondSub.constructor.name).toEqual("LabelComparisonExp");
|
||||
expect(secondSub.attributeName).toEqual("mylabel");
|
||||
|
||||
Reference in New Issue
Block a user