fix #3391: Remove flowchart as fallback for diagram detection.

This commit is contained in:
Sidharth Vinod
2022-10-06 19:14:25 +08:00
parent d59f878020
commit 1615c6d9f9
6 changed files with 53 additions and 25 deletions

View File

@@ -15,7 +15,9 @@ describe('DiagramAPI', () => {
it('should handle diagram registrations', () => {
expect(() => getDiagram('loki')).toThrow();
expect(() => detectType('loki diagram')).not.toThrow(); // TODO: #3391
expect(() => detectType('loki diagram')).toThrow(
'No diagram type detected for text: loki diagram'
);
const detector: DiagramDetector = (str: string) => {
return str.match('loki') !== null;
};