mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 15:30:03 +02:00
## Work in progress.
Implemented directives per PR review comment: %%{directive: json-encoded-arg-string}%% example: %%{init: { 'logLevel': 0, 'theme': 'dark' }}%% Also changed wrap and config to directives: %%{wrap}%% %%{config: { 'fontSize': 18 }}%%
This commit is contained in:
@@ -8,12 +8,19 @@ describe('when detecting chart type ', function() {
|
||||
expect(type).toBe('flowchart');
|
||||
});
|
||||
it('should handle an initialize defintion', function() {
|
||||
const str = 'initialize: { "logLevel": 0, "theme": "dark" }\ngraph TB\nbfs1:queue';
|
||||
const str = `
|
||||
%%{initialize: { 'logLevel': 0, 'theme': 'dark' }}%%
|
||||
graph TB
|
||||
bfs1:queue
|
||||
`;
|
||||
const init = JSON.stringify(utils.detectInit(str));
|
||||
expect(init).toBe('{"logLevel":0,"theme":"dark"}');
|
||||
});
|
||||
it('should handle an init defintion', function() {
|
||||
const str = 'init: { "logLevel": 0, "theme": "dark" }\ngraph TB\nbfs1:queue';
|
||||
const str = `
|
||||
%%{init: { 'logLevel': 0, 'theme': 'dark' }}%%
|
||||
graph TB
|
||||
bfs1:queue`;
|
||||
const init = JSON.stringify(utils.detectInit(str));
|
||||
expect(init).toBe('{"logLevel":0,"theme":"dark"}');
|
||||
});
|
||||
|
Reference in New Issue
Block a user