@k9n/scully-plugin-mermaid
Version:
this plugin for Scully provides a postRenderer to generate a SVGs from mermaid source code sections
21 lines (17 loc) • 575 B
text/typescript
import MermaidAPI from 'mermaid/mermaidAPI';
import { setPluginConfig } from '@scullyio/scully';
import { validator } from './validator';
import { getMermaidPlugin } from './scully-plugin-mermaid';
describe('validator', () => {
let options: MermaidAPI.Config;
let MermaidPlugin: any;
beforeEach(() => {
MermaidPlugin = getMermaidPlugin();
options = {};
});
it('should validate something', async () => {
setPluginConfig(MermaidPlugin, options);
const validationResult = await validator();
expect(validationResult.length).toEqual(0);
});
});