Skip to content

Commit db78e1f

Browse files
committed
Consider "Idle timeout reached" acceptable for timeout error.
1 parent be92475 commit db78e1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/timeout.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ describe('timeout', function () {
1515
return ncu({
1616
packageData: await fs.readFile(pkgPath, 'utf-8'),
1717
timeout: 1,
18-
}).should.eventually.be.rejectedWith('Exceeded global timeout of 1ms')
18+
}).should.eventually.be.rejectedWith(/Exceeded global timeout of 1ms|Idle timeout reached/)
1919
})
2020

2121
it('exit with error when timeout is exceeded', async () => {
2222
return spawn('node', [bin, '--timeout', '1'], {
2323
stdin: '{ "dependencies": { "express": "1" } }',
24-
}).should.eventually.be.rejectedWith('Exceeded global timeout of 1ms')
24+
}).should.eventually.be.rejectedWith(/Exceeded global timeout of 1ms|Idle timeout reached/)
2525
})
2626

2727
it('completes successfully with timeout', async () => {

0 commit comments

Comments
 (0)