From be5b8012bd17b5d8b32c69059f4eebc419681f39 Mon Sep 17 00:00:00 2001 From: Daniel Bartholomae Date: Wed, 24 Aug 2022 23:44:29 +0200 Subject: [PATCH] Add test for description --- src/diagrams/c4/parser/c4Person.spec.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/diagrams/c4/parser/c4Person.spec.js b/src/diagrams/c4/parser/c4Person.spec.js index bf91d74c4..7d3b92c44 100644 --- a/src/diagrams/c4/parser/c4Person.spec.js +++ b/src/diagrams/c4/parser/c4Person.spec.js @@ -39,6 +39,17 @@ Person(customerA, "Banking Customer A", "A customer of the bank, with personal b }); }); + it('should parse the description', function () { + c4.parser.parse(`C4Context +Person(customerA, "", "A customer of the bank, with personal bank accounts.")`); + + expect(c4.parser.yy.getC4ShapeArray()[0]).toMatchObject({ + descr: { + text: 'A customer of the bank, with personal bank accounts.', + }, + }); + }); + it('should parse a sprite', function () { c4.parser.parse(`C4Context Person(customerA, $sprite="users")`);