Skip to content

Commit 50e8afc

Browse files
h4lisaacs
authored andcommittedFeb 13, 2020
fix: use 30s default for timeout as per README
PR-URL: #20 Credit: @h4l Close: #20 Reviewed-by: @isaacs
1 parent 42f998a commit 50e8afc

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
 

‎config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ module.exports = figgyPudding({
6969
scope: {},
7070
spec: {},
7171
'strict-ssl': {},
72-
timeout: {},
72+
timeout: {
73+
default: 30 * 1000
74+
},
7375
'user-agent': {
7476
default: `${
7577
pkg.name

‎test/config.js

+10
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,13 @@ test('isFromCI config option', t => {
2020
t.notOk(OPTS.isFromCI, 'should be false if not on a CI env')
2121
t.end()
2222
})
23+
24+
test('default timeout', t => {
25+
const DEFAULT_OPTS = config({})
26+
t.equal(DEFAULT_OPTS.timeout, 30 * 1000, 'default timeout is 30s')
27+
const SPECIFIED_OPTS = config({
28+
timeout: 15 * 1000
29+
})
30+
t.equal(SPECIFIED_OPTS.timeout, 15 * 1000, 'default timeout can be overridden')
31+
t.end()
32+
})

0 commit comments

Comments
 (0)
Please sign in to comment.