mirror of
https://github.com/zadam/trilium.git
synced 2024-11-12 02:37:39 +08:00
21 lines
569 B
JavaScript
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"
|
|
]
|
|
]);
|
|
});
|
|
});
|