Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10c8262824 |
@@ -43,12 +43,7 @@ describe('handleSignals registration', () => {
|
|||||||
/** Boots the harness app, waits for its `ready` line, and resolves once it has exited. */
|
/** 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) {
|
function runHarness(signal: NodeJS.Signals, env: NodeJS.ProcessEnv = {}, sendTwice = false) {
|
||||||
return new Promise<{ code: number | null; signal: NodeJS.Signals | null; lines: string[] }>((resolve, reject) => {
|
return new Promise<{ code: number | null; signal: NodeJS.Signals | null; lines: string[] }>((resolve, reject) => {
|
||||||
// `process.execPath -r tsx/cjs`, not `npx tsx`: a wrapper puts the app one process further
|
const proc = spawn('npx', ['tsx', 'test/interop/_signal-app.ts'], {
|
||||||
// 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 },
|
env: { ...process.env, ...env },
|
||||||
stdio: ['ignore', 'pipe', 'inherit'],
|
stdio: ['ignore', 'pipe', 'inherit'],
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user