Skip to content

Commit a00b560

Browse files
committed
test: align packaged terminal smoke check
1 parent 5cd6588 commit a00b560

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/packaging-smoke.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ async function expectPackedTerminal(command: string, args: string[], env: Record
122122

123123
try {
124124
await waitFor(() => output.includes("Player") && output.includes("Library") && output.includes("Downloads"));
125-
expect(output).toContain("prev · next");
125+
expect(stripAnsi(output)).toContain("[ prev ] next");
126126
output = "";
127127
terminal.write("]");
128128
await waitFor(() => output.includes("▸ Library ◂"));
@@ -141,6 +141,10 @@ async function expectPackedTerminal(command: string, args: string[], env: Record
141141
}
142142
}
143143

144+
function stripAnsi(value: string): string {
145+
return value.replaceAll(/\x1b\[[0-?]*[ -/]*[@-~]/g, "");
146+
}
147+
144148
async function withTimeout<T>(promise: Promise<T>, timeoutMs: number, message: string): Promise<T> {
145149
let timer: ReturnType<typeof setTimeout> | undefined;
146150
try {

0 commit comments

Comments
 (0)