From 244e04cc4a97a920e5fa5c217495842320fc6381 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Mon, 1 Sep 2025 14:56:04 +0100 Subject: [PATCH] Add test with `analysisKindsInput: code-quality` --- src/config-utils.test.ts | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/config-utils.test.ts b/src/config-utils.test.ts index c78ba6a33..3feb0e96c 100644 --- a/src/config-utils.test.ts +++ b/src/config-utils.test.ts @@ -171,6 +171,47 @@ test("load empty config", async (t) => { }); }); +test("load code quality config", async (t) => { + return await withTmpDir(async (tempDir) => { + const logger = getRunnerLogger(true); + const languages = "actions"; + + const codeql = createStubCodeQL({ + async betterResolveLanguages() { + return { + extractors: { + actions: [{ extractor_root: "" }], + }, + }; + }, + }); + + const config = await configUtils.initConfig( + createTestInitConfigInputs({ + analysisKindsInput: "code-quality", + languagesInput: languages, + repository: { owner: "github", repo: "example" }, + tempDir, + codeql, + logger, + }), + ); + + t.deepEqual( + config, + await configUtils.getDefaultConfig( + createTestInitConfigInputs({ + analysisKindsInput: "code-quality", + languagesInput: languages, + tempDir, + codeql, + logger, + }), + ), + ); + }); +}); + test("loading config saves config", async (t) => { return await withTmpDir(async (tempDir) => { const logger = getRunnerLogger(true);