diff --git a/bin/package.json b/bin/package.json index d1611f820..c93b3f183 100644 --- a/bin/package.json +++ b/bin/package.json @@ -34,6 +34,7 @@ "puppeteer-chromium-resolver": "^23.0.0", "rimraf": "^6.0.1", "spex": "^3.4.0", + "strip-ansi": "^7.1.0", "tar": "^6.2.0", "which": "^5.0.0", "zx": "^8.3.2" diff --git a/bin/run-tests.mjs b/bin/run-tests.mjs index 2598fc796..431a16e92 100644 --- a/bin/run-tests.mjs +++ b/bin/run-tests.mjs @@ -4,6 +4,7 @@ import child from 'child_process'; import { resolve } from 'path'; import PCR from 'puppeteer-chromium-resolver'; +import stripAnsi from 'strip-ansi'; import { fileURLToPath } from 'url'; const { puppeteer, executablePath } = await PCR({}); @@ -61,7 +62,7 @@ try { page.on('console', (msg) => { console.error(msg.text()); const location = msg.location(); - const text = msg.text(); + const text = stripAnsi(msg.text()); if (text.includes('# fail')) { if (!text.includes('# fail 0')) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 467d9791c..21770a14c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -387,6 +387,9 @@ importers: spex: specifier: ^3.4.0 version: 3.4.0 + strip-ansi: + specifier: ^7.1.0 + version: 7.1.0 tar: specifier: ^6.2.0 version: 6.2.0