Skip to content

Commit 15df327

Browse files
committed
Debug in Win Node 23
1 parent 77b3fd4 commit 15df327

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

test/socket-cdxgen.test.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,27 @@ describe('Socket cdxgen command', async () => {
3131
it(
3232
'should forwards known commands to cdxgen',
3333
{
34-
skip: process.platform === 'win32',
34+
skip:
35+
process.platform === 'win32' &&
36+
process.version.slice(1).split('.')[0] !== '23',
3537
// Takes ~10s in CI
3638
timeout: 20_000
3739
},
3840
async () => {
3941
for (const command of ['-h', '--help']) {
40-
// eslint-disable-next-line no-await-in-loop
41-
const ret = await spawn(
42-
// Lazily access constants.execPath.
43-
constants.execPath,
44-
[entryPath, 'cdxgen', '--yes', command],
45-
spawnOpts
46-
)
42+
let ret
43+
try {
44+
// eslint-disable-next-line no-await-in-loop
45+
ret = await spawn(
46+
// Lazily access constants.execPath.
47+
constants.execPath,
48+
[entryPath, 'cdxgen', '--yes', command],
49+
spawnOpts
50+
)
51+
} catch (e) {
52+
ret = e
53+
console.log(ret.stderr)
54+
}
4755
expect(
4856
ret.stdout.includes('cdxgen'),
4957
'forwards commands to cdxgen'

0 commit comments

Comments
 (0)