Skip to content

Commit a266cd4

Browse files
test(cli): limit signal semantics to POSIX
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
1 parent 80e9cbe commit a266cd4

1 file changed

Lines changed: 22 additions & 19 deletions

File tree

‎packages/0-framework/3-tooling/cli/src/__tests__/run-alchemy.test.ts‎

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -242,26 +242,29 @@ describe('spawnAlchemy()', () => {
242242
* a failure: a signal-killed child has NO exit code, and saying otherwise
243243
* loses the only evidence that the user aborted.
244244
*/
245-
test('a signal-killed child comes back as the signal with a null exit code', async () => {
246-
const dir = makeTmpDir();
247-
installFakeAlchemy(dir, [
248-
'process.kill(process.pid, "SIGTERM");',
249-
'setTimeout(() => {}, 5000);',
250-
]);
245+
test.skipIf(process.platform === 'win32')(
246+
'a signal-killed child comes back as the signal with a null exit code',
247+
async () => {
248+
const dir = makeTmpDir();
249+
installFakeAlchemy(dir, [
250+
'process.kill(process.pid, "SIGTERM");',
251+
'setTimeout(() => {}, 5000);',
252+
]);
251253

252-
expect(
253-
await spawnAlchemy({
254-
action: 'deploy',
255-
stackFileRelativePath: '.prisma-composer/alchemy.run.ts',
256-
stage: 'test',
257-
cwd: dir,
258-
env: {},
259-
}),
260-
).toEqual({
261-
exitCode: null,
262-
signal: 'SIGTERM',
263-
});
264-
});
254+
expect(
255+
await spawnAlchemy({
256+
action: 'deploy',
257+
stackFileRelativePath: '.prisma-composer/alchemy.run.ts',
258+
stage: 'test',
259+
cwd: dir,
260+
env: {},
261+
}),
262+
).toEqual({
263+
exitCode: null,
264+
signal: 'SIGTERM',
265+
});
266+
},
267+
);
265268

266269
test('raises the structured error when the app has no alchemy installed', async () => {
267270
const dir = makeTmpDir();

0 commit comments

Comments
 (0)