Skip to content

Commit

Permalink
test: request option
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Oct 24, 2018
1 parent f09cb1b commit 0b4a7b1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/endpoint-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,24 @@ describe('endpoint()', () => {
}
})
})

it('request parameter', () => {
const options = endpoint('GET /', {
request: {
timeout: 100
}
})

expect(options).to.deep.equal({
method: 'get',
url: 'https://api.github.com/',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': userAgent
},
request: {
timeout: 100
}
})
})
})

0 comments on commit 0b4a7b1

Please sign in to comment.