Skip to content

Commit

Permalink
Merge pull request #317 from thomashohn/task-316-update-superagent-9
Browse files Browse the repository at this point in the history
[TASK] Update to superagent^9
  • Loading branch information
koddsson committed Apr 25, 2024
2 parents cc58a4b + bc64cf1 commit 6b50e3d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
5 changes: 3 additions & 2 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,11 @@ function serverAddress (app, path) {
* @api private
*/

function TestAgent(app) {
function TestAgent(app, options={}) {
if (!(this instanceof TestAgent)) return new TestAgent(app);
if (typeof app === 'function') app = http.createServer(app);
(Agent || Request).call(this);
const agent = new Agent(options);
Object.assign(this, agent);
this.app = app;
if (typeof app !== 'string' && app && app.listen && app.address && !app.address()) {
this.app = app.listen(0)
Expand Down
21 changes: 10 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"is-ip": "^3.1.0",
"methods": "^1.1.2",
"qs": "^6.11.2",
"superagent": "^8.0.9"
"superagent": "^9"
},
"devDependencies": {
"@jsdevtools/simplifyify": "^8.0.4",
Expand Down

0 comments on commit 6b50e3d

Please sign in to comment.