refactoring to allow unit tests of the whole search subsystem

This commit is contained in:
zadam
2020-05-21 14:05:56 +02:00
parent a06662f4ce
commit cd48135394
9 changed files with 42 additions and 32 deletions

View File

@@ -1,10 +1,10 @@
"use strict";
class ParsingContext {
constructor(includeNoteContent) {
this.includeNoteContent = includeNoteContent;
constructor(params = {}) {
this.includeNoteContent = !!params.includeNoteContent;
this.fuzzyAttributeSearch = !!params.fuzzyAttributeSearch;
this.highlightedTokens = [];
this.fuzzyAttributeSearch = false;
this.error = null;
}