From 3bc5cfa554b548a44fbd8ec64bae20738571407c Mon Sep 17 00:00:00 2001 From: Daniel Bartholomae Date: Wed, 24 Aug 2022 23:47:41 +0200 Subject: [PATCH] Add test for alias --- src/diagrams/c4/parser/c4Person.spec.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/diagrams/c4/parser/c4Person.spec.js b/src/diagrams/c4/parser/c4Person.spec.js index 49d52bbea..f4ea9bc23 100644 --- a/src/diagrams/c4/parser/c4Person.spec.js +++ b/src/diagrams/c4/parser/c4Person.spec.js @@ -39,6 +39,15 @@ Person(customerA, "Banking Customer A", "A customer of the bank, with personal b }); }); + it('should parse the alias', function () { + c4.parser.parse(`C4Context +Person(customerA, "Banking Customer A")`); + + expect(c4.parser.yy.getC4ShapeArray()[0]).toMatchObject({ + alias: 'customerA', + }); + }); + it('should parse the label', function () { c4.parser.parse(`C4Context Person(customerA, "Banking Customer A")`);