Skip to content

Commit 2ee2f52

Browse files
piotrskiclaude
andcommitted
fix(e2e): strip ANSI codes when detecting Vite ready output
Vite output in CI contains ANSI color codes that break the 'Local:' substring check. Strip them before matching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7899a38 commit 2ee2f52

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/e2e-tests/src/vite-server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ export async function startViteServer(
5656
}, 30_000);
5757

5858
const onOutput = (chunk: Buffer) => {
59-
const output = chunk.toString();
59+
// Strip ANSI escape codes so detection works in CI
60+
const output = chunk.toString().replace(/\x1b\[[0-9;]*m/g, '');
6061
if (output.includes('Local:') || output.includes(`localhost:${vitePort}`)) {
6162
clearTimeout(timeout);
6263
resolve();

0 commit comments

Comments
 (0)