Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
ad1992 committed Nov 27, 2023
1 parent 4a4d715 commit 7e11938
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/mermaid/src/diagram.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,14 @@ Expecting 'TXT', got 'NEWLINE'"
expect(messages[0].message).toBe('I fl°°9829¶ß you!');
expect(messages[1].message).toBe('I fl°°9829¶ß you fl°infin¶ß times more!');
});

test('should clean up comments when present in diagram defination', async () => {
const diagram = await getDiagramFromText(
`flowchart LR
%% this is a comment A -- text --> B{node}
A -- text --> B -- text2 --> C`
);
expect(diagram).toBeInstanceOf(Diagram);
expect(diagram.type).toBe('flowchart-v2');
});
});

0 comments on commit 7e11938

Please sign in to comment.