mirror of
https://github.com/zadam/trilium.git
synced 2024-11-14 19:55:10 +08:00
21 lines
669 B
JavaScript
21 lines
669 B
JavaScript
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"
|
|
]
|
|
]);
|
|
});
|
|
});
|