Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5d5fb801a |
@@ -43,7 +43,12 @@ describe('handleSignals registration', () => {
|
||||
/** Boots the harness app, waits for its `ready` line, and resolves once it has exited. */
|
||||
function runHarness(signal: NodeJS.Signals, env: NodeJS.ProcessEnv = {}, sendTwice = false) {
|
||||
return new Promise<{ code: number | null; signal: NodeJS.Signals | null; lines: string[] }>((resolve, reject) => {
|
||||
const proc = spawn('npx', ['tsx', 'test/interop/_signal-app.ts'], {
|
||||
// `process.execPath -r tsx/cjs`, not `npx tsx`: a wrapper puts the app one process further
|
||||
// down, and on Linux the signal then lands on the wrapper while the app never hears it — which
|
||||
// is exactly how this passed locally and failed in CI. `-r` rather than `--import`/`--loader`
|
||||
// because it is the one form that works on both the Node 18 floor CI builds against and the
|
||||
// current release.
|
||||
const proc = spawn(process.execPath, ['-r', 'tsx/cjs', 'test/interop/_signal-app.ts'], {
|
||||
env: { ...process.env, ...env },
|
||||
stdio: ['ignore', 'pipe', 'inherit'],
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user