trilium/spec/parens.spec.js

22 lines
669 B
JavaScript
Raw Normal View History

2020-05-19 06:00:35 +08:00
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"
]
]);
});
});