From 5b46322a4c2efdba2941e05a779d592eb2cabff7 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Fri, 24 Jan 2025 07:31:03 +0000 Subject: [PATCH] Build: Fix coverage job --- .github/workflows/coverage.yaml | 1 + test/cli/helpers/execute.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index eb8fc3106..2597f78ef 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -9,6 +9,7 @@ jobs: runs-on: ubuntu-20.04 env: PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download" + FORCE_COLOR: "1" steps: - uses: actions/checkout@v4 diff --git a/test/cli/helpers/execute.js b/test/cli/helpers/execute.js index 176afbcc8..a656b94f8 100644 --- a/test/cli/helpers/execute.js +++ b/test/cli/helpers/execute.js @@ -38,6 +38,11 @@ function normalize (actual) { // ESM-style internal traces from Node 14+: // Convert "at wrap (node:internal/modules/cjs/loader:1)" to "at internal" .replace(/^(\s+at ).+\([^/)][^)]*\)$/gm, '$1internal') + // ESM-style internal traces from Node 22+ that NYC corrupts + // https://github.com/istanbuljs/nyc/issues/1589 + // from "at Object..js (node:internal/modules/cjs/loader:1904:10)" + // to "at node:internal/modules/cjs/loader:1904:10" + .replace(/^(\s+at )[^/) ][^) ]+$/gm, '$1internal') // Convert /bin/qunit and /src/cli to internal as well // Because there are differences between Node 10 and Node 12 in terms