Commit b62c9fe0 by Daniel Cadenas

Make linter happy

parent 8e759b9e
......@@ -59,11 +59,7 @@ ClearbitClient.prototype.request = function (options) {
method: 'get'
});
if (options.timeout) {
var timeout = options.timeout;
} else {
var timeout = options.stream ? 60000 : 10000;
}
var timeout = options.timeout || options.stream && 60000 || 10000;
return needle.requestAsync(
options.method,
......
......@@ -105,8 +105,8 @@ describe('Client', function () {
return client
.request(clientRequestOptions)
.then(() => needle.request.firstCall.args[3])
.finally(() => needle.request.restore());
.then(function() { return needle.request.firstCall.args[3]; })
.finally(function() { return needle.request.restore(); });
}
it('can specify a custom timeout for a request', function () {
......@@ -114,14 +114,14 @@ describe('Client', function () {
api: 'person',
timeout: 30000
})
.then((needleOptions) => {
.then(function(needleOptions) {
expect(needleOptions).to.have.property('timeout', 30000);
});
});
it('sets the default timeout to 10 seconds', function () {
return requestWithOptions({ api: 'person' })
.then((needleOptions) => {
.then(function(needleOptions) {
expect(needleOptions).to.have.property('timeout', 10000);
});
});
......@@ -132,7 +132,7 @@ describe('Client', function () {
api: 'person',
stream: true
})
.then((needleOptions) => {
.then(function(needleOptions) {
expect(needleOptions).to.have.property('timeout', 60000);
});
});
......@@ -143,7 +143,7 @@ describe('Client', function () {
stream: true,
timeout: 30000
})
.then((needleOptions) => {
.then(function(needleOptions) {
expect(needleOptions).to.have.property('timeout', 30000);
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment