Skip to content

Commit

Permalink
Fix TestAgent not inheriting Agent properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruception committed Apr 24, 2024
1 parent 1e18c20 commit f290431
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const Test = require('./test.js');
function TestAgent(app, options = {}) {
if (!(this instanceof TestAgent)) return new TestAgent(app, options);

Agent.call(this, options);
const agent = new Agent(options);
Object.assign(this, agent);

this._options = options;

if (typeof app === 'function') {
Expand Down

0 comments on commit f290431

Please sign in to comment.