From 2a54ab50161a0e386fc920d02984dcd42f0df06f Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Thu, 16 Oct 2025 14:18:51 +0100 Subject: [PATCH] Fix `init-action-post-helper` tests using broken `Config`s --- src/init-action-post-helper.test.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/init-action-post-helper.test.ts b/src/init-action-post-helper.test.ts index 1c1cbcb68..bd911a8a9 100644 --- a/src/init-action-post-helper.test.ts +++ b/src/init-action-post-helper.test.ts @@ -28,12 +28,13 @@ test("post: init action with debug mode off", async (t) => { const gitHubVersion: util.GitHubVersion = { type: util.GitHubVariant.DOTCOM, }; - sinon.stub(configUtils, "getConfig").resolves({ - debugMode: false, - gitHubVersion, - languages: [], - packs: [], - } as unknown as configUtils.Config); + sinon.stub(configUtils, "getConfig").resolves( + createTestConfig({ + debugMode: false, + gitHubVersion, + languages: [], + }), + ); const uploadAllAvailableDebugArtifactsSpy = sinon.spy(); const printDebugLogsSpy = sinon.spy(); @@ -335,12 +336,11 @@ async function testFailedSarifUpload( matrix?: { [key: string]: string }; } = {}, ): Promise { - const config = { + const config = createTestConfig({ codeQLCmd: "codeql", debugMode: true, languages: [], - packs: [], - } as unknown as configUtils.Config; + }); if (databaseExists) { config.dbLocation = "path/to/database"; }