Skip to content

Commit

Permalink
Merge pull request #834 from Bruception/master
Browse files Browse the repository at this point in the history
fix: TestAgent not inheriting Agent properties
  • Loading branch information
titanism committed Apr 24, 2024
2 parents 1e18c20 + f290431 commit 225118c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/agent.js
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 225118c

Please sign in to comment.