feat: Ensure proper detection for flowcharts

This commit is contained in:
Sidharth Vinod
2023-02-24 17:27:24 +05:30
parent eca4163363
commit 4bf5c9f3d8
9 changed files with 57 additions and 18 deletions

View File

@@ -20,8 +20,8 @@ describe('DiagramAPI', () => {
it('should handle diagram registrations', () => {
expect(() => getDiagram('loki')).toThrow();
expect(() => detectType('loki diagram')).toThrow(
'No diagram type detected for text: loki diagram'
expect(() => detectType('loki diagram')).toThrowErrorMatchingInlineSnapshot(
'"No diagram type detected matching given configuration for text: loki diagram"'
);
const detector: DiagramDetector = (str: string) => {
return str.match('loki') !== null;