refactoring for testing parser

This commit is contained in:
zadam
2020-05-20 00:03:33 +02:00
parent ef37bc1a99
commit 99aa481ace
13 changed files with 204 additions and 175 deletions

View File

@@ -2,7 +2,6 @@
const NoteSet = require('../note_set');
const noteCache = require('../../note_cache/note_cache');
const noteCacheService = require('../../note_cache/note_cache_service');
class NoteCacheFulltextExp {
constructor(tokens) {
@@ -10,6 +9,9 @@ class NoteCacheFulltextExp {
}
execute(noteSet, searchContext) {
// has deps on SQL which breaks unit test so needs to be dynamically required
const noteCacheService = require('../../note_cache/note_cache_service');
const resultNoteSet = new NoteSet();
const candidateNotes = this.getCandidateNotes(noteSet);