mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-13 20:39:38 +02:00
Adding image snapshots for graphs
This commit is contained in:
13
e2e/helpers/util.js
Normal file
13
e2e/helpers/util.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Base64 } from 'js-base64'
|
||||
|
||||
const mermaidUrl = (graphStr, options) => {
|
||||
const obj = {
|
||||
code: graphStr,
|
||||
mermaid: options
|
||||
}
|
||||
const objStr = JSON.stringify(obj)
|
||||
// console.log(Base64)
|
||||
return 'http://localhost:9000/e2e.html?graph=' + Base64.encodeURI(objStr)
|
||||
}
|
||||
|
||||
export default mermaidUrl
|
Reference in New Issue
Block a user