Add test for $link

This commit is contained in:
Daniel Bartholomae 2022-08-24 23:36:14 +02:00
parent 8ee534f7fb
commit 5378316cc3
No known key found for this signature in database
GPG Key ID: 782CE028698BEE8C
1 changed files with 13 additions and 0 deletions

View File

@ -51,4 +51,17 @@ Person(customerA, $sprite="users")`);
},
});
});
it('should parse a link', function () {
c4.parser.parse(`C4Context
Person(customerA, $link="https://github.com/mermaidjs")`);
expect(c4.parser.yy.getC4ShapeArray()[0]).toMatchObject({
label: {
text: {
link: 'https://github.com/mermaidjs',
},
},
});
});
});