Make unit test regex unit test more accurate

This commit is contained in:
Ibrahim Wassouf 2023-07-08 14:33:57 -03:00
parent 4bec3188de
commit f82407a2f0
1 changed files with 1 additions and 1 deletions

View File

@ -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)/);
});
});