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

10
spec/parser.spec.js Normal file
View File

@@ -0,0 +1,10 @@
const parser = require('../src/services/search/parser');
describe("Parser", () => {
it("fulltext parser without content", () => {
const exps = parser(["hello", "hi"], [], false);
expect(exps.constructor.name).toEqual("NoteCacheFulltextExp");
expect(exps.tokens).toEqual(["hello", "hi"]);
});
});