mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-17 14:29:48 +02:00
test: Update tests
This commit is contained in:
@@ -682,14 +682,13 @@ describe('mermaidAPI', () => {
|
|||||||
it('returns false for invalid definition with silent option', async () => {
|
it('returns false for invalid definition with silent option', async () => {
|
||||||
await expect(
|
await expect(
|
||||||
mermaidAPI.parse('this is not a mermaid diagram definition', { suppressErrors: true })
|
mermaidAPI.parse('this is not a mermaid diagram definition', { suppressErrors: true })
|
||||||
).resolves.toStrictEqual({ isValid: false });
|
).resolves.toBe(false);
|
||||||
});
|
});
|
||||||
it('resolves for valid definition', async () => {
|
it('resolves for valid definition', async () => {
|
||||||
await expect(mermaidAPI.parse('graph TD;A--x|text including URL space|B;')).resolves
|
await expect(mermaidAPI.parse('graph TD;A--x|text including URL space|B;')).resolves
|
||||||
.toMatchInlineSnapshot(`
|
.toMatchInlineSnapshot(`
|
||||||
{
|
{
|
||||||
"diagramType": "flowchart-v2",
|
"diagramType": "flowchart-v2",
|
||||||
"isValid": true,
|
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
@@ -699,7 +698,6 @@ describe('mermaidAPI', () => {
|
|||||||
).resolves.toMatchInlineSnapshot(`
|
).resolves.toMatchInlineSnapshot(`
|
||||||
{
|
{
|
||||||
"diagramType": "flowchart-v2",
|
"diagramType": "flowchart-v2",
|
||||||
"isValid": true,
|
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user