From f82407a2f02d87f3ae350c6578636498e6d5d470 Mon Sep 17 00:00:00 2001 From: Ibrahim Wassouf Date: Sat, 8 Jul 2023 14:33:57 -0300 Subject: [PATCH] Make unit test regex unit test more accurate --- packages/mermaid/src/diagrams/class/classDiagram.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/diagrams/class/classDiagram.spec.ts b/packages/mermaid/src/diagrams/class/classDiagram.spec.ts index 434647806..5666ac358 100644 --- a/packages/mermaid/src/diagrams/class/classDiagram.spec.ts +++ b/packages/mermaid/src/diagrams/class/classDiagram.spec.ts @@ -349,7 +349,7 @@ class C13["With Città foreign language"] it.each(keywords)('should elicit error for %s after NOTE token', function (keyword: string) { const str = `classDiagram note ${keyword}`; - expect(() => parser.parse(str)).toThrowError(/expecting | unrecognized/i); + expect(() => parser.parse(str)).toThrowError(/(Expecting\s'STR'|Unrecognized\stext)/); }); });