test(cli): expect the update alias to pass the host platform to the update host (#11263)

This commit is contained in:
morluto authored and GitHub committed 2026-11-15 10:12:41 -05:00
1 parent 4c5f5a3338
commit c4154b0c7e
1 file changed
+9 -3
+9 -3
View File
@@ -7,6 +7,7 @@ import { createTestTempDirectory } from "../fixtures/temporaryDirectory.js";
import { createCli } from "../../src/cli.js";
import { PRODUCT_IDENTITY } from "../../src/identity.js";
import { HOST_PLATFORM } from "../../src/platform/HostPlatform.js";
const mocks = vi.hoisted(() => ({
run: vi.fn(),
@@ -105,9 +106,14 @@ it.each(["json", "jsonl", "yaml", "toon", "md"])(
{ owner: "selected-update-host" },
"structured",
);
expect(mocks.host).toHaveBeenLastCalledWith(undefined, undefined, {
REA_SELECTED_UPDATE: "original",
});
expect(mocks.host).toHaveBeenLastCalledWith(
undefined,
undefined,
{
REA_SELECTED_UPDATE: "original",
},
HOST_PLATFORM.platform,
);
expect(mocks.dependencyInstall).not.toHaveBeenCalled();
},
);