mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
test: Update tests
This commit is contained in:
parent
479188bc40
commit
6871ad09e6
@ -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,
|
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user