diff --git a/lib/agent.js b/lib/agent.js index 9a7810e..6e4e7d8 100644 --- a/lib/agent.js +++ b/lib/agent.js @@ -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') {