diff --git a/cypress/platform/rerender.html b/cypress/platform/rerender.html index 0d7588ef5..ab1b8e009 100644 --- a/cypress/platform/rerender.html +++ b/cypress/platform/rerender.html @@ -19,10 +19,9 @@ function rerender(text) { const graphText = `graph TD A[${text}] -->|Get money| B(Go shopping)`; - mermaid.mermaidAPI.renderAsync('id', graphText).then((svg) => { - console.log('\x1b[35m%s\x1b[0m', '>> graph', svg); - document.getElementById('graph').innerHTML = svg; - }); + const graph = mermaid.mermaidAPI.render('id', graphText); + console.log('\x1b[35m%s\x1b[0m', '>> graph', graph); + document.getElementById('graph').innerHTML = graph; }