From bf17737969303c2d8adf2a404913b0cb5af909da Mon Sep 17 00:00:00 2001 From: Affaan Mustafa Date: Mon, 18 May 2026 03:48:51 -0400 Subject: [PATCH] test: stabilize repair lifecycle on Windows --- eslint.config.js | 2 +- tests/scripts/repair.test.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index acb4b672..4d86fbef 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -3,7 +3,7 @@ const globals = require('globals'); module.exports = [ { - ignores: ['.opencode/dist/**', '.cursor/**', 'node_modules/**'] + ignores: ['.opencode/dist/**', '.cursor/**', 'node_modules/**', '.venv/**', 'venv/**', 'coverage/**'] }, js.configs.recommended, { diff --git a/tests/scripts/repair.test.js b/tests/scripts/repair.test.js index 98a22573..cbd80a15 100644 --- a/tests/scripts/repair.test.js +++ b/tests/scripts/repair.test.js @@ -12,6 +12,7 @@ const INSTALL_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'install-appl const DOCTOR_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'doctor.js'); const REPAIR_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'repair.js'); const REPO_ROOT = path.join(__dirname, '..', '..'); +const CLI_TIMEOUT_MS = 30000; const CURRENT_PACKAGE_VERSION = JSON.parse( fs.readFileSync(path.join(REPO_ROOT, 'package.json'), 'utf8') ).version; @@ -51,7 +52,7 @@ function runNode(scriptPath, args = [], options = {}) { env, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'], - timeout: 10000, + timeout: options.timeout || CLI_TIMEOUT_MS, }); return { code: 0, stdout, stderr: '' }; @@ -59,7 +60,7 @@ function runNode(scriptPath, args = [], options = {}) { return { code: error.status || 1, stdout: error.stdout || '', - stderr: error.stderr || '', + stderr: error.stderr || error.message || '', }; } }