Files
can1357 cd8409154d fix(coding-agent): serialized isolated-task merges and fixed async batch accounting
stash/cherry-pick merge sequence runs under the repo lock (lost-uncommitted-changes race); stash-pop failure no longer mislabels merged branches; async batches cannot stick at running forever; queued tasks stop counting against the global job cap; aborted session startup disposes the late session; fail-fast propagates the worker signal; command expansion treats user input dollar-patterns literally; progress snapshots stop structured-cloning tool payloads.
2026-06-10 01:27:40 +02:00

19 lines
692 B
TypeScript

import { describe, expect, it } from "bun:test";
import { expandCommand, type WorkflowCommand } from "@oh-my-pi/pi-coding-agent/task/commands";
function makeCommand(instructions: string): WorkflowCommand {
return { name: "test", description: "test", instructions, source: "project", filePath: "test.md" };
}
describe("expandCommand", () => {
it("substitutes $@ with the input", () => {
expect(expandCommand(makeCommand("Do: $@ and again $@"), "fix the bug")).toBe(
"Do: fix the bug and again fix the bug",
);
});
it("keeps $-patterns in user input literal", () => {
expect(expandCommand(makeCommand("Run $@"), "echo $$ $& $' $` $@")).toBe("Run echo $$ $& $' $` $@");
});
});