diff --git a/src/testing-utils.ts b/src/testing-utils.ts index b24e2d360..8a7cf8e2d 100644 --- a/src/testing-utils.ts +++ b/src/testing-utils.ts @@ -144,7 +144,7 @@ export function setupTests(test: TestFn) { * environment. Tests can override individual variables by passing them in the * `overrides` parameter. */ -export const DEFAULT_ACTIONS_VARS: Record = { +export const DEFAULT_ACTIONS_VARS = { GITHUB_ACTION_REPOSITORY: "github/codeql-action", GITHUB_API_URL: "https://api.github.com", GITHUB_EVENT_NAME: "push", @@ -157,14 +157,14 @@ export const DEFAULT_ACTIONS_VARS: Record = { GITHUB_SHA: "0".repeat(40), GITHUB_WORKFLOW: "test-workflow", RUNNER_OS: "Linux", -}; +} as const satisfies Record; // Sets environment variables that make using some libraries designed for // use only on actions safe to use outside of actions. export function setupActionsVars( tempDir: string, toolsDir: string, - overrides?: Partial>, + overrides?: Partial>, ) { const vars = { ...DEFAULT_ACTIONS_VARS, ...overrides }; for (const [key, value] of Object.entries(vars)) {