trilium/spec/search/parens.spec.js

22 lines
575 B
JavaScript
Raw Normal View History

2020-06-03 22:24:41 +08:00
const parens = require('../../src/services/search/parens.js');
2020-05-19 06:00:35 +08:00
describe("Parens handler", () => {
2020-05-20 06:03:33 +08:00
it("handles parens", () => {
2020-05-19 06:00:35 +08:00
expect(parens(["(", "hello", ")", "and", "(", "(", "pick", "one", ")", "and", "another", ")"]))
.toEqual([
[
"hello"
],
"and",
[
[
"pick",
"one"
],
"and",
"another"
]
]);
});
});