Add accDescription field to state diagrams

This commit is contained in:
Tali Herzka
2022-04-07 21:35:13 +00:00
committed by GitHub
parent 0c5252594e
commit 49409241bc
12 changed files with 506 additions and 275 deletions

View File

@@ -24,6 +24,20 @@ describe('state diagram, ', function () {
`;
parser.parse(str);
const description = stateDb.getAccDescription();
expect(description).toBe('');
});
it.only('simple with accDescription', function () {
const str = `stateDiagram\n
accDescription a simple description of the diagram
State1 : this is another string
[*] --> State1
State1 --> [*]
`;
parser.parse(str);
const description = stateDb.getAccDescription();
expect(description).toBe('a simple description of the diagram');
});
it('simple with directive', function () {
const str = `%%{init: {'logLevel': 0 }}%%