Skip to content

Commit 2a54ab5

Browse files
committed
Fix init-action-post-helper tests using broken Configs
1 parent 17783bf commit 2a54ab5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/init-action-post-helper.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ test("post: init action with debug mode off", async (t) => {
2828
const gitHubVersion: util.GitHubVersion = {
2929
type: util.GitHubVariant.DOTCOM,
3030
};
31-
sinon.stub(configUtils, "getConfig").resolves({
32-
debugMode: false,
33-
gitHubVersion,
34-
languages: [],
35-
packs: [],
36-
} as unknown as configUtils.Config);
31+
sinon.stub(configUtils, "getConfig").resolves(
32+
createTestConfig({
33+
debugMode: false,
34+
gitHubVersion,
35+
languages: [],
36+
}),
37+
);
3738

3839
const uploadAllAvailableDebugArtifactsSpy = sinon.spy();
3940
const printDebugLogsSpy = sinon.spy();
@@ -335,12 +336,11 @@ async function testFailedSarifUpload(
335336
matrix?: { [key: string]: string };
336337
} = {},
337338
): Promise<initActionPostHelper.UploadFailedSarifResult> {
338-
const config = {
339+
const config = createTestConfig({
339340
codeQLCmd: "codeql",
340341
debugMode: true,
341342
languages: [],
342-
packs: [],
343-
} as unknown as configUtils.Config;
343+
});
344344
if (databaseExists) {
345345
config.dbLocation = "path/to/database";
346346
}

0 commit comments

Comments
 (0)