mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-21 06:53:17 +08:00
f41e34e61a
Exposes the registerDiagram() function publically as `mermaid.mermaidAPI.registerDiagram` so that users can add their own diagrams at bundle-time. This is instead of using the lazyLoadedDiagrams config setting.
14 lines
474 B
JavaScript
14 lines
474 B
JavaScript
describe('mermaid', () => {
|
|
describe('registerDiagram', () => {
|
|
it('should work on @mermaid-js/mermaid-mindmap and mermaid-example-diagram', () => {
|
|
const url = 'http://localhost:9000/external-diagrams-mindmap.html';
|
|
cy.visit(url);
|
|
|
|
cy.get('svg', {
|
|
// may be a bit slower than normal, since vite might need to re-compile mermaid/mermaid-mindmap/mermaid-example-diagram
|
|
timeout: 10000,
|
|
}).matchImageSnapshot();
|
|
});
|
|
});
|
|
});
|