test: sankey, pie, seq diagram
This commit is contained in:
parent
087a5748c8
commit
9b411fa8d4
|
@ -140,10 +140,12 @@ describe('pie', () => {
|
|||
});
|
||||
|
||||
it('should handle unsafe properties', async () => {
|
||||
await expect(parser.parse(`pie title Unsafe props test
|
||||
await expect(
|
||||
parser.parse(`pie title Unsafe props test
|
||||
"__proto__" : 386
|
||||
"constructor" : 85
|
||||
"prototype" : 15`)).resolves.toBeUndefined();
|
||||
"prototype" : 15`)
|
||||
).resolves.toBeUndefined();
|
||||
expect([...db.getSections().keys()]).toEqual(['__proto__', 'constructor', 'prototype']);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -22,10 +22,12 @@ describe('Sankey diagram', function () {
|
|||
});
|
||||
|
||||
it('allows __proto__ as id', function () {
|
||||
sankey.parser.parse(prepareTextForParsing(`sankey-beta
|
||||
sankey.parser.parse(
|
||||
prepareTextForParsing(`sankey-beta
|
||||
__proto__,A,0.597
|
||||
A,__proto__,0.403
|
||||
`));
|
||||
`)
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -2035,8 +2035,10 @@ participant Alice`;
|
|||
});
|
||||
|
||||
it.each(['__proto__', 'constructor'])('should allow %s as an actor name', function (prop) {
|
||||
mermaidAPI.parse(`
|
||||
expect(
|
||||
mermaidAPI.parse(`
|
||||
sequenceDiagram
|
||||
${prop}-->>A: Hello, how are you?`);
|
||||
${prop}-->>A: Hello, how are you?`)
|
||||
).resolves.toBeDefined();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue