From 3bf270e8b9f82f2fc602970014c0b8abd1c9e152 Mon Sep 17 00:00:00 2001 From: sanex3339 Date: Mon, 13 Jan 2020 00:32:53 +0300 Subject: [PATCH] Updated getRegExpMatch error message --- test/helpers/getRegExpMatch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helpers/getRegExpMatch.ts b/test/helpers/getRegExpMatch.ts index 4adeb008..f03fd973 100644 --- a/test/helpers/getRegExpMatch.ts +++ b/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 (match)[matchIndex + 1];