Skip to content

Commit e793c18

Browse files
authored
test: Add test case (#82)
1 parent e9eb520 commit e793c18

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

src/components/Utils/utils.test.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,27 @@ describe("Parsing lines with links", () => {
3636
];
3737
const links = parseLinks(lines);
3838
expect(links.length).toBe(3);
39-
expect(links[0]?.text).toBeFalsy();
40-
expect(links[1]?.text?.endsWith(")")).toBeFalsy();
39+
expect(links[0]?.text).toBeFalsy(); //
40+
expect(links[1]?.text?.endsWith(")")).toBeFalsy(); //
4141
expect(links[2]?.text).toBe(")");
4242
});
4343
});
44+
45+
describe("", () => {
46+
it("", () => {
47+
const lines = [
48+
{
49+
text: "aaa bbb ccc",
50+
},
51+
{
52+
text: "wrap1 'http://bla.alb/add' wrap2 wrap3",
53+
},
54+
{
55+
text: "�[31m�[1m>�[22m�[2m�[39m�[90m �[36mthis�[39m�[33m.�[39mextend(�[36mthis",
56+
},
57+
];
58+
const links = parseLinks(lines);
59+
expect(links[0]?.text).toBe("aaa bbb ccc");
60+
//
61+
});
62+
});

0 commit comments

Comments
 (0)