make ErrorMatcher an object rather than a tuple
This commit is contained in:
parent
1fb7c81099
commit
b3b99014eb
12 changed files with 58 additions and 48 deletions
|
|
@ -21,8 +21,8 @@ function testErrorMatcher(matcherName: string, logSample: string): boolean {
|
|||
if (!(matcherName in namedMatchersForTesting)) {
|
||||
throw new Error(`Unknown matcher ${matcherName}`);
|
||||
}
|
||||
const regex = namedMatchersForTesting[matcherName][1];
|
||||
if (regex === null) {
|
||||
const regex = namedMatchersForTesting[matcherName].outputRegex;
|
||||
if (regex === undefined) {
|
||||
throw new Error(`Cannot test matcher ${matcherName} with null regex`);
|
||||
}
|
||||
return regex.test(logSample);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue