Address Copilot's review comments

This commit is contained in:
Michael B. Gale
2026-02-26 12:48:32 +00:00
parent f657c4e1eb
commit 3c911485ed
2 changed files with 14 additions and 11 deletions

View File

@@ -15,7 +15,6 @@ import { parseLanguage } from "./start-proxy";
import * as statusReport from "./status-report";
import {
checkExpectedLogMessages,
createFeatures,
getRecordingLogger,
makeTestToken,
RecordingLogger,
@@ -392,19 +391,22 @@ function mockOfflineFeatures(tempDir: string, logger: Logger) {
}
test("getDownloadUrl returns fallback when `getReleaseByVersion` rejects", async (t) => {
const logger = new RecordingLogger();
mockGetReleaseByTag();
const features = createFeatures([]);
const info = await startProxyExports.getDownloadUrl(
getRunnerLogger(true),
features,
);
await withTmpDir(async (tempDir) => {
const features = mockOfflineFeatures(tempDir, logger);
const info = await startProxyExports.getDownloadUrl(
getRunnerLogger(true),
features,
);
t.is(info.version, startProxyExports.UPDATEJOB_PROXY_VERSION);
t.is(
info.url,
startProxyExports.getFallbackUrl(startProxyExports.getProxyPackage()),
);
t.is(info.version, startProxyExports.UPDATEJOB_PROXY_VERSION);
t.is(
info.url,
startProxyExports.getFallbackUrl(startProxyExports.getProxyPackage()),
);
});
});
test("getDownloadUrl returns fallback when there's no matching release asset", async (t) => {