Add mockCCR helper to testing-utils

This commit is contained in:
Michael B. Gale
2026-02-12 18:22:44 +00:00
parent ee8360df59
commit 377300bcda
3 changed files with 13 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ import {
import { computeAutomationID } from "./api-client";
import { EnvVar } from "./environment";
import { getRunnerLogger } from "./logging";
import { setupTests } from "./testing-utils";
import { mockCCR, setupTests } from "./testing-utils";
import { initializeEnvironment } from "./util";
setupTests(test);
@@ -258,8 +258,8 @@ test("isDynamicWorkflow() returns true if event name is `dynamic`", (t) => {
});
test("isCCR() returns true when expected", (t) => {
process.env.GITHUB_EVENT_NAME = "dynamic";
process.env[EnvVar.ANALYSIS_KEY] = "dynamic/copilot-pull-request-reviewer";
mockCCR();
t.assert(isCCR());
t.false(isDefaultSetup());
});