mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-13 11:09:39 +02:00
Added the option to disable auto rendering via the mermaid namespace as described in issue #91
Added optional ; as statement separator equal to newline for sequence diagrams (help for tidy users)
This commit is contained in:
@@ -272,6 +272,25 @@ describe('when parsing a sequenceDiagram',function() {
|
||||
expect(messages[1].from).toBe('Bob');
|
||||
|
||||
|
||||
});
|
||||
it('it should handle opt statements a sequenceDiagram', function () {
|
||||
var str = 'sequenceDiagram;Alice->Bob: Hello Bob, how are you?;opt Perhaps a happy response;Bob-->Alice: I am good thanks!;end;';
|
||||
|
||||
sq.parse(str);
|
||||
var actors = sq.yy.getActors();
|
||||
//console.log(actors);
|
||||
expect(actors.Alice.description).toBe('Alice');
|
||||
actors.Bob.description = 'Bob';
|
||||
|
||||
var messages = sq.yy.getMessages();
|
||||
//console.log(messages);
|
||||
|
||||
expect(messages.length).toBe(4);
|
||||
expect(messages[0].from).toBe('Alice');
|
||||
expect(messages[1].type).toBe(sq.yy.LINETYPE.OPT_START);
|
||||
expect(messages[2].from).toBe('Bob');
|
||||
|
||||
|
||||
});
|
||||
|
||||
it('it should handle alt statements a sequenceDiagram', function () {
|
||||
|
Reference in New Issue
Block a user