Add override for code scanning analysis of default branch

This commit is contained in:
Charis Kyriakou 2023-03-23 10:55:50 +00:00
parent 04f256d7e2
commit 94cc1dea00
6 changed files with 24 additions and 6 deletions

View file

@ -214,6 +214,10 @@ test("initializeEnvironment", (t) => {
});
test("isAnalyzingDefaultBranch()", async (t) => {
process.env["CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH"] = "true";
t.deepEqual(await actionsutil.isAnalyzingDefaultBranch(), true);
process.env["CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH"] = "false";
await withTmpDir(async (tmpDir) => {
setupActionsVars(tmpDir, tmpDir);
const envFile = path.join(tmpDir, "event.json");