Files
multica/packages/views/runtimes/components/runtime-docs.test.ts

23 lines
782 B
TypeScript

import { describe, expect, it } from "vitest";
import {
customRuntimeDocsHref,
daemonRuntimesDocsHref,
} from "./runtime-docs";
describe("runtime docs links", () => {
it.each([
["en", "https://multica.ai/docs/daemon-runtimes"],
["zh-Hans", "https://multica.ai/docs/zh/daemon-runtimes"],
["ja", "https://multica.ai/docs/ja/daemon-runtimes"],
["ko", "https://multica.ai/docs/ko/daemon-runtimes"],
])("localizes the daemon guide for %s", (language, expected) => {
expect(daemonRuntimesDocsHref(language)).toBe(expected);
});
it("adds the localized custom runtime section", () => {
expect(customRuntimeDocsHref("zh-Hans")).toBe(
`https://multica.ai/docs/zh/daemon-runtimes#${encodeURIComponent("自定义运行时配置")}`,
);
});
});