| 1 | import assert from "node:assert/strict"; |
| 2 | import { test } from "node:test"; |
| 3 | |
| 4 | import { shownStep } from "./agent-step"; |
| 5 | |
| 6 | test("a step that hands back a file says what was done, not where", () => { |
| 7 | assert.equal(shownStep("Said: Done. The review is written to `/work/review.json`."), "Wrote its review."); |
| 8 | assert.equal(shownStep("Said: Plan saved to /work/plan.json"), "Wrote the plan."); |
| 9 | assert.equal(shownStep("Said: I wrote /work/answer.md"), "Wrote its answer."); |
| 10 | }); |
| 11 | |
| 12 | test("paths in the checkout read as the repository's own", () => { |
| 13 | assert.equal(shownStep("Editing `/work/repo/src/math.js`"), "Editing src/math.js"); |
| 14 | assert.equal(shownStep("Running npm test"), "Running npm test"); |
| 15 | }); |