mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-30 05:36:43 +02:00
chore: Add test with both frontmatter and directive
This commit is contained in:
@@ -133,6 +133,27 @@ config:
|
|||||||
themeVariables:
|
themeVariables:
|
||||||
primaryColor: '#ff0000'
|
primaryColor: '#ff0000'
|
||||||
---
|
---
|
||||||
|
graph TD
|
||||||
|
A(Start) --> B[/Another/]
|
||||||
|
A[/Another/] --> C[End]
|
||||||
|
subgraph section
|
||||||
|
B
|
||||||
|
C
|
||||||
|
end
|
||||||
|
`,
|
||||||
|
{ theme: 'forest' }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('Theme from initialize, frontmatter overriding theme variable, directive overriding primaryColor - nodes should be red', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
theme: base
|
||||||
|
themeVariables:
|
||||||
|
primaryColor: '#00ff00'
|
||||||
|
---
|
||||||
|
%%{init: {'theme': 'base', 'themeVariables':{ 'primaryColor': '#ff0000'}}}%%
|
||||||
graph TD
|
graph TD
|
||||||
A(Start) --> B[/Another/]
|
A(Start) --> B[/Another/]
|
||||||
A[/Another/] --> C[End]
|
A[/Another/] --> C[End]
|
||||||
|
Reference in New Issue
Block a user