Files
modelstudioai__cli/packages/runtime/tests/harness/cross-domain-main.ts
clh02467605 d646a4e780 refactor(e2e): update test routes and streamline command handling
- Replaced hardcoded command paths with dynamic route mappings in E2E tests.
- Enhanced documentation for command testing, specifying minimum route requirements.
- Consolidated command path management into `topic-routes.ts` for better maintainability.
- Updated various E2E test cases to utilize the new routing structure, ensuring consistency across tests.
- Removed redundant helper functions and improved test clarity by directly referencing route exports.
2026-07-10 15:55:53 +08:00

34 lines
826 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineCommand } from "bailian-cli-core";
import { createCli } from "bailian-cli-runtime";
import pkg from "../../package.json" with { type: "json" };
const noop = async () => {};
/** apiKey 域 stub用于跨域 flag 拒绝测试 */
const textChat = defineCommand({
description: "runtime e2e stub",
auth: "apiKey",
flags: {
message: { type: "string", valueHint: "<m>", description: "message" },
},
run: noop,
});
/** console 域 stub用于跨域 flag 拒绝测试 */
const mcpList = defineCommand({
description: "runtime e2e stub",
auth: "console",
flags: {},
run: noop,
});
void createCli(
{ "text chat": textChat, "mcp list": mcpList },
{
binName: "bl",
version: pkg.version,
clientName: "runtime-e2e",
npmPackage: "bailian-cli-runtime-e2e-harness",
},
).run();