mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 00:35:50 +01:00
parens handler + parser in progress
This commit is contained in:
21
spec/parens.spec.js
Normal file
21
spec/parens.spec.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const parens = require('../src/services/search/parens');
|
||||
|
||||
describe("Parens handler", () => {
|
||||
it("handles parens", () => {console.log(parens(["(", "hello", ")", "and", "(", "(", "pick", "one", ")", "and", "another", ")"]))
|
||||
expect(parens(["(", "hello", ")", "and", "(", "(", "pick", "one", ")", "and", "another", ")"]))
|
||||
.toEqual([
|
||||
[
|
||||
"hello"
|
||||
],
|
||||
"and",
|
||||
[
|
||||
[
|
||||
"pick",
|
||||
"one"
|
||||
],
|
||||
"and",
|
||||
"another"
|
||||
]
|
||||
]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user