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