feat: migrate jasmine tests to ts

This commit is contained in:
Alex
2024-05-08 23:59:11 +02:00
parent aa4960f1a5
commit fcb30f6319
20 changed files with 24998 additions and 24936 deletions

View File

@@ -0,0 +1,24 @@
const handleParens = require('../../src/services/search/services/handle_parens');
describe("Parens handler", () => {
it("handles parens", () => {
const input = ["(", "hello", ")", "and", "(", "(", "pick", "one", ")", "and", "another", ")"]
.map(token => ({token}));
expect(handleParens(input))
.toEqual([
[
{token: "hello"}
],
{token: "and"},
[
[
{token: "pick"},
{token: "one"}
],
{token: "and"},
{token: "another"}
]
]);
});
});