From 5378316cc3a0fa0577c69b087656da23f907d01f Mon Sep 17 00:00:00 2001 From: Daniel Bartholomae Date: Wed, 24 Aug 2022 23:36:14 +0200 Subject: [PATCH] Add test for $link --- src/diagrams/c4/parser/c4Person.spec.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/diagrams/c4/parser/c4Person.spec.js b/src/diagrams/c4/parser/c4Person.spec.js index 5f620baf9..1e1b11163 100644 --- a/src/diagrams/c4/parser/c4Person.spec.js +++ b/src/diagrams/c4/parser/c4Person.spec.js @@ -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', + }, + }, + }); + }); });