mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-21 00:09:51 +02:00
add test for multi-line accDescr
This commit is contained in:

parent
f1bc2deafd
commit
6e486d3c49
@@ -323,18 +323,34 @@ describe('when parsing ER diagram it...', function () {
|
|||||||
expect(Object.keys(erDb.getEntities()).length).toBe(1);
|
expect(Object.keys(erDb.getEntities()).length).toBe(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should allow for a accessibility title and description (accDescr)', function () {
|
describe('accessible title and description', () => {
|
||||||
const teacherRole = 'is teacher of';
|
const teacherRole = 'is teacher of';
|
||||||
const line1 = `TEACHER }o--o{ STUDENT : "${teacherRole}"`;
|
const line1 = `TEACHER }o--o{ STUDENT : "${teacherRole}"`;
|
||||||
|
|
||||||
erDiagram.parser.parse(
|
it('should allow for a accessibility title and description (accDescr)', function () {
|
||||||
`erDiagram
|
erDiagram.parser.parse(
|
||||||
|
`erDiagram
|
||||||
accTitle: graph title
|
accTitle: graph title
|
||||||
accDescr: this graph is about stuff
|
accDescr: this graph is about stuff
|
||||||
${line1}`
|
${line1}`
|
||||||
);
|
);
|
||||||
expect(erDb.getAccTitle()).toBe('graph title');
|
expect(erDb.getAccTitle()).toBe('graph title');
|
||||||
expect(erDb.getAccDescription()).toBe('this graph is about stuff');
|
expect(erDb.getAccDescription()).toBe('this graph is about stuff');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('parses a multi line description (accDescr)', function () {
|
||||||
|
erDiagram.parser.parse(
|
||||||
|
`erDiagram
|
||||||
|
accTitle: graph title
|
||||||
|
accDescr { this graph is
|
||||||
|
about
|
||||||
|
stuff
|
||||||
|
}\n
|
||||||
|
${line1}`
|
||||||
|
);
|
||||||
|
expect(erDb.getAccTitle()).toEqual('graph title');
|
||||||
|
expect(erDb.getAccDescription()).toEqual('this graph is\nabout\nstuff');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should allow more than one relationship between the same two entities', function () {
|
it('should allow more than one relationship between the same two entities', function () {
|
||||||
|
Reference in New Issue
Block a user