sandbox-agent/foundry/packages/cli/test/task-editor.test.ts
Nathan Flurry d75e8c31d1
Rename Foundry handoffs to tasks (#239)
* Restore foundry onboarding stack

* Consolidate foundry rename

* Create foundry tasks without prompts

* Rename Foundry handoffs to tasks
2026-03-11 13:23:54 -07:00

25 lines
552 B
TypeScript

import { describe, expect, it } from "vitest";
import { sanitizeEditorTask } from "../src/task-editor.js";
describe("task editor helpers", () => {
it("strips comment lines and trims whitespace", () => {
const value = sanitizeEditorTask(`
# comment
Implement feature
# another comment
with more detail
`);
expect(value).toBe("Implement feature\n\nwith more detail");
});
it("returns empty string when only comments are present", () => {
const value = sanitizeEditorTask(`
# hello
# world
`);
expect(value).toBe("");
});
});