fix: add shell:true for Windows compatibility in all-scenarios.test (#82)

spawn('npx', ...) fails on Windows because npx is actually npx.cmd.
Adding shell: true only on Windows fixes this while preserving
Unix signal handling behavior.

🦉 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ola Hungerford 2026-01-05 04:53:42 -07:00 • committed by GitHub
commit 5f1bedd54b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,10 +15,13 @@ describe('Server Scenarios', () => {
'examples/servers/typescript/everything-server.ts'
);
// Use shell: true on Windows only (npx is npx.cmd on Windows)
const isWindows = process.platform === 'win32';
serverProcess = spawn('npx', ['tsx', serverPath], {
env: { ...process.env, PORT: TEST_PORT.toString() },
stdio: ['ignore', 'pipe', 'pipe'],
detached: false
detached: false,
shell: isWindows
});
// Capture output for debugging