mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Rename Language enum and use generic Language where possible
This commit is contained in:
8
lib/codeql.test.js
generated
8
lib/codeql.test.js
generated
@@ -65,7 +65,7 @@ const NO_FEATURES = (0, testing_utils_1.createFeatures)([]);
|
||||
ava_1.default.beforeEach(() => {
|
||||
(0, util_1.initializeEnvironment)("1.2.3");
|
||||
stubConfig = (0, testing_utils_1.createTestConfig)({
|
||||
languages: [languages_1.Language.cpp],
|
||||
languages: [languages_1.KnownLanguage.cpp],
|
||||
});
|
||||
});
|
||||
async function installIntoToolcache({ apiDetails = testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, cliVersion, isPinned, tagName, tmpDir, }) {
|
||||
@@ -101,7 +101,7 @@ async function stubCodeql() {
|
||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.17.6"));
|
||||
sinon
|
||||
.stub(codeqlObject, "isTracedLanguage")
|
||||
.withArgs(languages_1.Language.cpp)
|
||||
.withArgs(languages_1.KnownLanguage.cpp)
|
||||
.resolves(true);
|
||||
return codeqlObject;
|
||||
}
|
||||
@@ -578,7 +578,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
||||
sinon.stub(codeqlObject, "resolveExtractor").resolves("/path/to/extractor");
|
||||
// io throws because of the test CodeQL object.
|
||||
sinon.stub(io, "which").resolves("");
|
||||
await t.throwsAsync(async () => await codeqlObject.runAutobuild(stubConfig, languages_1.Language.java), {
|
||||
await t.throwsAsync(async () => await codeqlObject.runAutobuild(stubConfig, languages_1.KnownLanguage.java), {
|
||||
instanceOf: util.ConfigurationError,
|
||||
message: "We were unable to automatically build your code. Please provide manual build steps. " +
|
||||
`See ${doc_url_1.DocUrl.AUTOMATIC_BUILD_FAILED} for more information. ` +
|
||||
@@ -595,7 +595,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
||||
sinon.stub(codeqlObject, "resolveExtractor").resolves("/path/to/extractor");
|
||||
// io throws because of the test CodeQL object.
|
||||
sinon.stub(io, "which").resolves("");
|
||||
await t.throwsAsync(async () => await codeqlObject.runAutobuild(stubConfig, languages_1.Language.java), {
|
||||
await t.throwsAsync(async () => await codeqlObject.runAutobuild(stubConfig, languages_1.KnownLanguage.java), {
|
||||
instanceOf: util.ConfigurationError,
|
||||
message: "We were unable to automatically build your code. Please provide manual build steps. " +
|
||||
`See ${doc_url_1.DocUrl.AUTOMATIC_BUILD_FAILED} for more information. ` +
|
||||
|
||||
Reference in New Issue
Block a user