From f290431ee6890e4a90a38fa38c2b0584fe26b631 Mon Sep 17 00:00:00 2001 From: Bruce Berrios Date: Tue, 23 Apr 2024 20:34:24 -0400 Subject: [PATCH] Fix TestAgent not inheriting Agent properties --- lib/agent.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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') {