소스 검색

Updated getRegExpMatch error message

sanex3339 5 년 전
부모
커밋
3bf270e8b9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      test/helpers/getRegExpMatch.ts

+ 1 - 1
test/helpers/getRegExpMatch.ts

@@ -8,7 +8,7 @@ export function getRegExpMatch (str: string, regExp: RegExp, matchIndex: number
     const match: RegExpMatchArray | null = str.match(regExp);
 
     if (!match) {
-        throw new Error(`No matches were found for regular expression \`${regExp.toString()}\``);
+        throw new Error(`No matches were found. String: \`${str}\`, regular expression: \`${regExp.toString()}\``);
     }
 
     return (<RegExpMatchArray>match)[matchIndex + 1];