mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
make ErrorMatcher an object rather than a tuple
This commit is contained in:
4
lib/error-matcher.test.js
generated
4
lib/error-matcher.test.js
generated
@@ -20,8 +20,8 @@ function testErrorMatcher(matcherName, logSample) {
|
||||
if (!(matcherName in error_matcher_1.namedMatchersForTesting)) {
|
||||
throw new Error(`Unknown matcher ${matcherName}`);
|
||||
}
|
||||
const regex = error_matcher_1.namedMatchersForTesting[matcherName][1];
|
||||
if (regex === null) {
|
||||
const regex = error_matcher_1.namedMatchersForTesting[matcherName].outputRegex;
|
||||
if (regex === undefined) {
|
||||
throw new Error(`Cannot test matcher ${matcherName} with null regex`);
|
||||
}
|
||||
return regex.test(logSample);
|
||||
|
||||
Reference in New Issue
Block a user