Skip to content

Commit 789ebcd

Browse files
Merge pull request #1718 from glimmerjs/fix-erroneous-success
Fix accidental success in tests due to ansi-output not matching non-ansi string.
2 parents 2f5333c + be4d2fe commit 789ebcd

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

bin/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"puppeteer-chromium-resolver": "^23.0.0",
3535
"rimraf": "^6.0.1",
3636
"spex": "^3.4.0",
37+
"strip-ansi": "^7.1.0",
3738
"tar": "^6.2.0",
3839
"which": "^5.0.0",
3940
"zx": "^8.3.2"

bin/run-tests.mjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import child from 'child_process';
55
import { resolve } from 'path';
66
import PCR from 'puppeteer-chromium-resolver';
7+
import stripAnsi from 'strip-ansi';
78
import { fileURLToPath } from 'url';
89

910
const { puppeteer, executablePath } = await PCR({});
@@ -61,7 +62,7 @@ try {
6162
page.on('console', (msg) => {
6263
console.error(msg.text());
6364
const location = msg.location();
64-
const text = msg.text();
65+
const text = stripAnsi(msg.text());
6566

6667
if (text.includes('# fail')) {
6768
if (!text.includes('# fail 0')) {

pnpm-lock.yaml

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)