F3 SLICE-5: live claude-code turn via applyAgentEdit seam + manual smoke (INV-8) (#6)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { extractReplacement } from "../src/liveTurn";
|
||||
|
||||
describe("extractReplacement", () => {
|
||||
it("returns plain text untouched", () => {
|
||||
expect(extractReplacement("Hello world.")).toBe("Hello world.");
|
||||
});
|
||||
it("strips a wrapping fence", () => {
|
||||
expect(extractReplacement("```\nHello world.\n```")).toBe("Hello world.");
|
||||
});
|
||||
it("strips a language-tagged fence", () => {
|
||||
expect(extractReplacement("```markdown\nHello.\n```\n")).toBe("Hello.");
|
||||
});
|
||||
it("leaves inner fences alone", () => {
|
||||
const inner = "before\n```js\ncode\n```\nafter";
|
||||
expect(extractReplacement(inner)).toBe(inner);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user