Skip to content

Commit

Permalink
more const
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmywarting committed Jan 4, 2022
1 parent 1d70492 commit a0a5d57
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
* Module dependencies.
*/

var Agent = require('superagent').agent;
var methods = require('methods');
var http = require('http');
var Test = require('./test');

/**
* Expose `Agent`.
*/

module.exports = TestAgent;
const { agent: Agent } = require('superagent');
const methods = require('methods');
const http = require('http');
const Test = require('./test');

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

0 comments on commit a0a5d57

Please sign in to comment.