Skip to content

Commit

Permalink
refactor(TestAgent): removed the host param when creating Test object
Browse files Browse the repository at this point in the history
`Test` constructor has already removed the host param in de056d2
  • Loading branch information
lamweili committed Sep 20, 2022
1 parent 5e23869 commit 1c8930d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/agent.js
Expand Up @@ -39,7 +39,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
const req = new Test(this.app, method.toUpperCase(), url, this._host);
const req = new Test(this.app, method.toUpperCase(), url);

if (this._host) {
req.set('host', this._host);
Expand Down

0 comments on commit 1c8930d

Please sign in to comment.