trilium/spec/parens.spec.js
2020-05-20 00:03:33 +02:00

21 lines
569 B
JavaScript

const parens = require('../src/services/search/parens');
describe("Parens handler", () => {
it("handles parens", () => {
expect(parens(["(", "hello", ")", "and", "(", "(", "pick", "one", ")", "and", "another", ")"]))
.toEqual([
[
"hello"
],
"and",
[
[
"pick",
"one"
],
"and",
"another"
]
]);
});
});