16 lines
640 B
TypeScript
16 lines
640 B
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
// Bun 直接执行 TypeScript 测试时需要保留扩展名;生产 tsconfig 不包含 test/。
|
|
import { defaultModelCapabilityConfig, normalizeVideoValue } from "../src/lib/model-capabilities.ts";
|
|
|
|
test("switching to MiniMax H3 replaces an unsupported 720p value with 768P", () => {
|
|
const profile = defaultModelCapabilityConfig("minimax-video", "MiniMax-H3").video!;
|
|
|
|
assert.deepEqual(normalizeVideoValue(profile, { seconds: "11", ratio: "16:9", resolution: "720" }), {
|
|
seconds: "11",
|
|
ratio: "16:9",
|
|
resolution: "768P",
|
|
});
|
|
});
|