Skip to content

Commit

Permalink
add diagram to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikrantpalle committed Jul 26, 2024
1 parent 8591460 commit 7bae205
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/mermaid/src/mermaidAPI.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ vi.mock('./diagrams/xychart/xychartRenderer.js');
vi.mock('./diagrams/requirement/requirementRenderer.js');
vi.mock('./diagrams/sequence/sequenceRenderer.js');
vi.mock('./diagrams/state/stateRenderer-v2.js');
vi.mock('./diagrams/treeView/renderer.js');

// -------------------------------------

Expand Down Expand Up @@ -733,6 +734,7 @@ describe('mermaidAPI', () => {
{ textDiagramType: 'requirementDiagram', expectedType: 'requirement' },
{ textDiagramType: 'sequenceDiagram', expectedType: 'sequence' },
{ textDiagramType: 'stateDiagram-v2', expectedType: 'stateDiagram' },
{ textDiagramType: 'treeView-beta', expectedType: 'treeView' },
];

describe('accessibility', () => {
Expand Down
2 changes: 2 additions & 0 deletions packages/mermaid/src/styles.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import timeline from './diagrams/timeline/styles.js';
import mindmap from './diagrams/mindmap/styles.js';
import packet from './diagrams/packet/styles.js';
import block from './diagrams/block/styles.js';
import treeView from './diagrams/treeView/styles.js';
import themes from './themes/index.js';

function checkValidStylisCSSStyleSheet(stylisString: string) {
Expand Down Expand Up @@ -99,6 +100,7 @@ describe('styles', () => {
block,
timeline,
packet,
treeView,
})) {
test(`should return a valid style for diagram ${diagramId} and theme ${themeId}`, async () => {
const { default: getStyles, addStylesForDiagram } = await import('./styles.js');
Expand Down

0 comments on commit 7bae205

Please sign in to comment.