From 02a531977760b845393734d3d324d956cbc926e8 Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Fri, 27 Feb 2026 10:07:02 -0600 Subject: [PATCH] fix(ci): propagate coverage env in cross-platform test runner The run-tests.cjs child process now inherits NODE_V8_COVERAGE from the parent so c8 collects coverage data. Also restores npm scripts to use the cross-platform runner for both test and test:coverage commands. Co-Authored-By: Claude Opus 4.6 --- scripts/run-tests.cjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/run-tests.cjs b/scripts/run-tests.cjs index a771e2a30..d50d79fd1 100644 --- a/scripts/run-tests.cjs +++ b/scripts/run-tests.cjs @@ -1,6 +1,7 @@ #!/usr/bin/env node // Cross-platform test runner — resolves test file globs via Node // instead of relying on shell expansion (which fails on Windows PowerShell/cmd). +// Propagates NODE_V8_COVERAGE so c8 collects coverage from the child process. 'use strict'; const { readdirSync } = require('fs'); @@ -19,7 +20,10 @@ if (files.length === 0) { } try { - execFileSync(process.execPath, ['--test', ...files], { stdio: 'inherit' }); + execFileSync(process.execPath, ['--test', ...files], { + stdio: 'inherit', + env: { ...process.env }, + }); } catch (err) { process.exit(err.status || 1); }