chore: reformat

This commit is contained in:
can1357
2026-07-30 04:25:32 +02:00
parent 2905a23fc1
commit ccd3bb9565
13 changed files with 425 additions and 436 deletions
@@ -114,27 +114,21 @@ describe("default echo/printf redirect rule", () => {
describe("default hub start rules", () => {
const tools = ["hub"];
it.each([
"bun run dev",
"vite --host 0.0.0.0",
"lldb ./app",
"bun test --watch",
"nohup server",
"server &",
])("routes %s to hub start", command => {
const result = checkBashInterception(command, tools, DEFAULT_BASH_INTERCEPTOR_RULES);
expect(result.block).toBe(true);
expect(result.suggestedTool).toBe("hub");
});
it.each(["bun run dev", "vite --host 0.0.0.0", "lldb ./app", "bun test --watch", "nohup server", "server &"])(
"routes %s to hub start",
command => {
const result = checkBashInterception(command, tools, DEFAULT_BASH_INTERCEPTOR_RULES);
expect(result.block).toBe(true);
expect(result.suggestedTool).toBe("hub");
},
);
it.each([
"git diff -w",
"docker compose up -d",
"bun test",
"printf 'server &'",
])("does not misclassify finite command %s", command => {
expect(checkBashInterception(command, tools, DEFAULT_BASH_INTERCEPTOR_RULES).block).toBe(false);
});
it.each(["git diff -w", "docker compose up -d", "bun test", "printf 'server &'"])(
"does not misclassify finite command %s",
command => {
expect(checkBashInterception(command, tools, DEFAULT_BASH_INTERCEPTOR_RULES).block).toBe(false);
},
);
});
describe("BashTool argument validation", () => {