Skip to content

Commit a0a5d57

Browse files
committedJan 4, 2022
more const
1 parent 1d70492 commit a0a5d57

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed
 

Diff for: ‎lib/agent.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44
* Module dependencies.
55
*/
66

7-
var Agent = require('superagent').agent;
8-
var methods = require('methods');
9-
var http = require('http');
10-
var Test = require('./test');
11-
127
/**
138
* Expose `Agent`.
149
*/
1510

1611
module.exports = TestAgent;
12+
const { agent: Agent } = require('superagent');
13+
const methods = require('methods');
14+
const http = require('http');
15+
const Test = require('./test');
1716

1817
/**
1918
* Initialize a new `TestAgent`.
@@ -50,7 +49,7 @@ TestAgent.prototype.host = function(host) {
5049
// override HTTP verb methods
5150
methods.forEach(function(method) {
5251
TestAgent.prototype[method] = function(url, fn) { // eslint-disable-line no-unused-vars
53-
var req = new Test(this.app, method.toUpperCase(), url, this._host);
52+
const req = new Test(this.app, method.toUpperCase(), url, this._host);
5453
req.ca(this._ca);
5554
req.cert(this._cert);
5655
req.key(this._key);

0 commit comments

Comments
 (0)
Please sign in to comment.