Skip to content

Commit 74064af

Browse files
committed
Add test with analysisKindsInput: code-quality
1 parent 5599403 commit 74064af

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

src/config-utils.test.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,47 @@ test("load empty config", async (t) => {
171171
});
172172
});
173173

174+
test("load code quality config", async (t) => {
175+
return await withTmpDir(async (tempDir) => {
176+
const logger = getRunnerLogger(true);
177+
const languages = "actions";
178+
179+
const codeql = createStubCodeQL({
180+
async betterResolveLanguages() {
181+
return {
182+
extractors: {
183+
actions: [{ extractor_root: "" }],
184+
},
185+
};
186+
},
187+
});
188+
189+
const config = await configUtils.initConfig(
190+
createTestInitConfigInputs({
191+
analysisKindsInput: "code-quality",
192+
languagesInput: languages,
193+
repository: { owner: "github", repo: "example" },
194+
tempDir,
195+
codeql,
196+
logger,
197+
}),
198+
);
199+
200+
t.deepEqual(
201+
config,
202+
await configUtils.getDefaultConfig(
203+
createTestInitConfigInputs({
204+
analysisKindsInput: "code-quality",
205+
languagesInput: languages,
206+
tempDir,
207+
codeql,
208+
logger,
209+
}),
210+
),
211+
);
212+
});
213+
});
214+
174215
test("loading config saves config", async (t) => {
175216
return await withTmpDir(async (tempDir) => {
176217
const logger = getRunnerLogger(true);

0 commit comments

Comments
 (0)