test: 修正 mock 的滥用情况

This commit is contained in:
claude-code-best
2026-04-17 10:13:09 +08:00
parent c5ab83a3fc
commit a14b7f352b
15 changed files with 10 additions and 843 deletions

View File

@@ -1,11 +1,4 @@
import { mock, describe, expect, test } from "bun:test";
// Mock commands.ts to cut the heavy shell/prefix.ts → analytics → api chain
mock.module("src/utils/bash/commands.ts", () => ({
splitCommand_DEPRECATED: (cmd: string) =>
cmd.split(/\s*(?:[|;&]+)\s*/).filter(Boolean),
quote: (args: string[]) => args.join(" "),
}));
import { describe, expect, test } from "bun:test";
const { interpretCommandResult } = await import("../commandSemantics");