Skip to content

Commit

Permalink
Avoid rest/spread operations in mocha tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas-Duboc-IBM committed Jul 2, 2019
1 parent b92c959 commit b803847
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"strict": [2, "global"],
"lines-around-directive": 0,
"func-names": 0,
"no-unused-expressions": 0
"no-unused-expressions": 0,
"prefer-rest-params": 0
}
}
4 changes: 2 additions & 2 deletions test/RequestSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ describe('Request - test against httpbin.org', () => {
it('Honors http agent provided by user', () => {
const callTrace = [];
const agent = new http.Agent();
agent.createConnection = (...args) => {
agent.createConnection = function () {
callTrace.push(1);
return net.createConnection(...args);
return net.createConnection.apply(null, arguments);
};
request = new Request('GET', 'http://httpbin.org/get', {
agent,
Expand Down

0 comments on commit b803847

Please sign in to comment.