Stub RUNNER_NAME in unit tests

This commit is contained in:
Henry Mercer
2026-03-11 20:16:47 +00:00
parent b1f1e7bd31
commit 926e6dfee5
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -144,6 +144,8 @@ test.serial("load empty config", async (t) => {
const logger = getRunnerLogger(true);
const languages = "javascript,python";
setupActionsVars(tempDir, tempDir);
const codeql = createStubCodeQL({
async betterResolveLanguages() {
return {
@@ -185,6 +187,8 @@ test.serial("load code quality config", async (t) => {
const logger = getRunnerLogger(true);
const languages = "actions";
setupActionsVars(tempDir, tempDir);
const codeql = createStubCodeQL({
async betterResolveLanguages() {
return {
@@ -237,6 +241,8 @@ test.serial(
const logger = getRunnerLogger(true);
const languages = "javascript";
setupActionsVars(tempDir, tempDir);
const codeql = createStubCodeQL({
async betterResolveLanguages() {
return {
@@ -475,6 +481,8 @@ test.serial("load non-existent input", async (t) => {
test.serial("load non-empty input", async (t) => {
return await withTmpDir(async (tempDir) => {
setupActionsVars(tempDir, tempDir);
const codeql = createStubCodeQL({
async betterResolveLanguages() {
return {
+1
View File
@@ -156,6 +156,7 @@ export const DEFAULT_ACTIONS_VARS = {
GITHUB_SERVER_URL: "https://github.com",
GITHUB_SHA: "0".repeat(40),
GITHUB_WORKFLOW: "test-workflow",
RUNNER_NAME: "my-runner",
RUNNER_OS: "Linux",
} as const satisfies Record<string, string>;