Refactoring: Introduce common method to stub a config
This means that we don't need to update irrelevant test cases when we add a new configuration property.
This commit is contained in:
parent
ec42edcaab
commit
d2e867f3be
18 changed files with 114 additions and 207 deletions
|
|
@ -26,6 +26,7 @@ import {
|
|||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
mockBundleDownloadApi,
|
||||
makeVersionInfo,
|
||||
createTestConfig,
|
||||
} from "./testing-utils";
|
||||
import * as util from "./util";
|
||||
import { initializeEnvironment } from "./util";
|
||||
|
|
@ -37,25 +38,9 @@ let stubConfig: Config;
|
|||
test.beforeEach(() => {
|
||||
initializeEnvironment("1.2.3");
|
||||
|
||||
stubConfig = {
|
||||
stubConfig = createTestConfig({
|
||||
languages: [Language.cpp],
|
||||
originalUserInput: {},
|
||||
tempDir: "",
|
||||
codeQLCmd: "",
|
||||
gitHubVersion: {
|
||||
type: util.GitHubVariant.DOTCOM,
|
||||
} as util.GitHubVersion,
|
||||
dbLocation: "",
|
||||
debugMode: false,
|
||||
debugArtifactName: util.DEFAULT_DEBUG_ARTIFACT_NAME,
|
||||
debugDatabaseName: util.DEFAULT_DEBUG_DATABASE_NAME,
|
||||
augmentationProperties: {
|
||||
packsInputCombines: false,
|
||||
queriesInputCombines: false,
|
||||
},
|
||||
trapCaches: {},
|
||||
trapCacheDownloadTime: 0,
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
async function installIntoToolcache({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue