From c49a78e92594656cd718fb276f6c94869c7e033e Mon Sep 17 00:00:00 2001 From: Jesse David Peterson Date: Wed, 14 Jan 2026 21:35:01 -0400 Subject: [PATCH] fix(script): use Jest binary path instead of assuming install --- scripts/test-coverage-by-codeowner.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/test-coverage-by-codeowner.js b/scripts/test-coverage-by-codeowner.js index 55c13dfa6e9..a19bbd43210 100644 --- a/scripts/test-coverage-by-codeowner.js +++ b/scripts/test-coverage-by-codeowner.js @@ -2,6 +2,7 @@ const { AutoComplete } = require('enquirer'); const cp = require('node:child_process'); +const path = require('node:path'); const { hideBin } = require('yargs/helpers'); const yargs = require('yargs/yargs'); @@ -35,9 +36,9 @@ async function runTestCoverageByCodeowner(codeownerName, noOpen = process.env.CI process.env.SHOULD_OPEN_COVERAGE_REPORT = String(!noOpen); return new Promise((resolve, reject) => { - const child = cp.spawn('jest', [`--config=${JEST_CONFIG_PATH}`], { + const jestBin = path.join(__dirname, '..', 'node_modules', '.bin', 'jest'); + const child = cp.spawn(jestBin, [`--config=${JEST_CONFIG_PATH}`], { stdio: 'inherit', - shell: true, }); child.on('error', (error) => {