Files
multica/apps/web/features/landing/components/download/hero.test.ts
Jiayuan Zhang 47e9c8add5 fix(web): add macOS Intel downloads to landing page (#5517)
Co-authored-by: Lambda <lambda@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
2026-07-16 15:11:27 +08:00

30 lines
937 B
TypeScript

import { describe, expect, it } from "vitest";
import { createEnDict } from "../../i18n/en";
import { resolveContent } from "./hero";
describe("resolveContent", () => {
it("links confidently detected Intel Macs to the x64 installers", () => {
const content = resolveContent(
{ os: "mac", arch: "x64", archConfident: true },
{
macArm64Dmg: "https://downloads.test/mac-arm64.dmg",
macArm64Zip: "https://downloads.test/mac-arm64.zip",
macX64Dmg: "https://downloads.test/mac-x64.dmg",
macX64Zip: "https://downloads.test/mac-x64.zip",
},
false,
createEnDict(true).download.hero,
);
expect(content.primary).toEqual({
href: "https://downloads.test/mac-x64.dmg",
label: "Download (.dmg)",
disabled: false,
});
expect(content.alt).toEqual({
href: "https://downloads.test/mac-x64.zip",
label: "or download .zip",
});
});
});