add test for initial error matcher

This commit is contained in:
Nick Fyson
2020-09-07 22:50:37 +01:00
parent 7dbaff09b6
commit 3e6d23928b
8 changed files with 95 additions and 16 deletions

18
lib/error_matcher.js generated
View File

@@ -1,6 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.error_matchers = [
[32, new RegExp("No JavaScript or TypeScript code found\\."), 'foo bar']
];
// exported only for testing purposes
exports.namedMatchersForTesting = {
/*
In due course it may be possible to remove the regex, if/when javascript also exits with code 32.
For context see https://github.com/github/semmle-code/pull/36921
*/
noSourceCodeFound: [
32,
new RegExp("No JavaScript or TypeScript code found\\."),
`No source code was seen during the build. Please see...
https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning#no-code-found-during-the-build`
],
};
// we collapse the matches into an array for use in exec_wrapper
exports.errorMatchers = Object.values(exports.namedMatchersForTesting);
//# sourceMappingURL=error_matcher.js.map