Skip to content

Commit 9bf2aa5

Browse files
committed
Set timeout for test
1 parent 10f17c8 commit 9bf2aa5

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

test/socket-cdxgen.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('Socket cdxgen command', async () => {
3838
'forwards commands to cdxgen'
3939
).toBe(true)
4040
}
41-
})
41+
}, 20_000)
4242
describe('command forwarding', async () => {
4343
expect.extend({
4444
toHaveStderrStartWith(received, expected) {
@@ -66,18 +66,22 @@ describe('Socket cdxgen command', async () => {
6666
it('should not forward --unknown to cdxgen', async () => {
6767
const command = '--unknown'
6868
await expect(
69-
// Lazily access constants.execPath.
7069
async () =>
71-
spawn(constants.execPath, [entryPath, 'cdxgen', command], spawnOpts)
70+
await spawn(
71+
// Lazily access constants.execPath.
72+
constants.execPath,
73+
[entryPath, 'cdxgen', command],
74+
spawnOpts
75+
)
7276
// @ts-ignore -- toHaveStderrStartWith is defined above
7377
).rejects.toHaveStderrStartWith(`Unknown argument: ${command}`)
7478
})
7579

7680
it('should not forward multiple unknown commands to cdxgen', async () => {
7781
await expect(
78-
// Lazily access constants.execPath.
7982
() =>
8083
spawn(
84+
// Lazily access constants.execPath.
8185
constants.execPath,
8286
[entryPath, 'cdxgen', '-u', '-h', '--unknown'],
8387
spawnOpts

test/socket-npm.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const npmFixturesPath = path.join(testPath, 'socket-npm-fixtures')
1717
for (const npmDir of ['npm8', 'npm10']) {
1818
if (process.env['CI']) {
1919
// Skip this test in CI.
20-
describe('skipme', () => it('should skip', () => expect(true).toBe(true)));
20+
describe('skipme', () => it('should skip', () => expect(true).toBe(true)))
2121
continue
2222
}
2323
const npmPath = path.join(npmFixturesPath, npmDir)

0 commit comments

Comments
 (0)