MCPcopy Create free account
hub / github.com/modem-dev/hunk / expectNoUnsafeTerminalControls

Function expectNoUnsafeTerminalControls

src/ui/staticDiffPager.test.ts:20–31  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

18const SOS_PAYLOAD = "\x1bXpayload\x1b\\";
19
20function expectNoUnsafeTerminalControls(text: string) {
21 expect(text).not.toContain(OSC52_CLIPBOARD);
22 expect(text).not.toContain(CSI_CLEAR_SCREEN);
23 expect(text).not.toContain(DCS_PAYLOAD);
24 expect(text).not.toContain(APC_PAYLOAD);
25 expect(text).not.toContain(PM_PAYLOAD);
26 expect(text).not.toContain(SOS_PAYLOAD);
27 expect(text).not.toContain("\x07");
28 expect(text).not.toContain("\r");
29 expect(text).not.toContain("\b");
30 expect(text).not.toContain("\x1b");
31}
32
33describe("static diff pager", () => {
34 test("renders diff-like stdin as non-interactive ANSI output", async () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected