diff --git a/packages/coding-agent/test/bash-executor.test.ts b/packages/coding-agent/test/bash-executor.test.ts index 6e5b344c2..1afcde430 100644 --- a/packages/coding-agent/test/bash-executor.test.ts +++ b/packages/coding-agent/test/bash-executor.test.ts @@ -818,8 +818,7 @@ exit 64 ].join("\n"), ); const rawSnapshot = fs.readFileSync(snapshotPath, "utf8"); - const { content: scrubbed, dropped } = - shellSnapshot.sanitizeSnapshotForBrush(rawSnapshot); + const { content: scrubbed, dropped } = shellSnapshot.sanitizeSnapshotForBrush(rawSnapshot); fs.writeFileSync(snapshotPath, scrubbed); expect(dropped).toEqual(["which"]); // Compatible aliases must still be installed in brush. diff --git a/packages/coding-agent/test/shell-snapshot.test.ts b/packages/coding-agent/test/shell-snapshot.test.ts index 0a74540f9..7806ff335 100644 --- a/packages/coding-agent/test/shell-snapshot.test.ts +++ b/packages/coding-agent/test/shell-snapshot.test.ts @@ -36,7 +36,7 @@ describe("sanitizeSnapshotForBrush", () => { // single quote (and a pipe), so the filter still trips on the pipe. ["decoded-pipe", "alias -- a='cat '\\''one'\\'' | head'"], ])("drops aliases whose body needs shell parsing (%s)", (_label, line) => { - const result = sanitizeSnapshotForBrush(line + "\n"); + const result = sanitizeSnapshotForBrush(`${line}\n`); expect(result.dropped).toEqual(["a"]); expect(result.content).not.toContain("alias -- a="); }); @@ -49,7 +49,7 @@ describe("sanitizeSnapshotForBrush", () => { // must survive — we only ban truly unparseable bodies. ["embedded-quote", "alias -- say='echo '\\''hello'\\'''"], ])("preserves aliases brush can handle by whitespace split (%s)", (_label, line) => { - const result = sanitizeSnapshotForBrush(line + "\n"); + const result = sanitizeSnapshotForBrush(`${line}\n`); expect(result.dropped).toEqual([]); expect(result.content).toContain(line); });