mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-01 21:29:40 +02:00
fix: Cypress test for Suppress Error
This commit is contained in:
@@ -47,9 +47,12 @@
|
||||
const shouldSuppress =
|
||||
new URLSearchParams(window.location.search).get('suppressErrorRendering') === 'true';
|
||||
mermaid.initialize({ startOnLoad: false, suppressErrorRendering: shouldSuppress });
|
||||
await mermaid.run();
|
||||
if (window.Cypress) {
|
||||
window.rendered = true;
|
||||
try {
|
||||
await mermaid.run();
|
||||
} catch {
|
||||
if (window.Cypress) {
|
||||
window.rendered = true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user