fix(test): update Windows _debugProcess test to match Bun's error message

Bun uses a file mapping mechanism for cross-process inspector activation,
which produces different error messages than Node.js's native implementation.
This commit is contained in:
Alistair Smith
2026-01-05 18:25:45 +00:00
committed by Claude
parent cc6704de2f
commit 856eda2f24

View File

@@ -16,6 +16,7 @@ cp.on('exit', common.mustCall(function() {
try {
process._debugProcess(cp.pid);
} catch (error) {
assert.strictEqual(error.message, 'The system cannot find the file specified.');
// Bun uses a file mapping mechanism for _debugProcess, so the error message differs from Node.js
assert.match(error.message, /Failed to open debug handler for process \d+/);
}
}));