From 1dca9938b70fe606eb766ca8f24d9f3aa96e301f Mon Sep 17 00:00:00 2001 From: Santiago Rodriguez Date: Tue, 23 Apr 2024 20:54:36 -0500 Subject: [PATCH] fix(TestAgent): Instantiate Agent with options --- lib/agent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/agent.js b/lib/agent.js index 4b33f07..958bc13 100644 --- a/lib/agent.js +++ b/lib/agent.js @@ -25,7 +25,7 @@ const Test = require('./test.js'); function TestAgent(app, options = {}) { if (!(this instanceof TestAgent)) return new TestAgent(app, options); - Object.defineProperties(this, Object.getOwnPropertyDescriptors(new Agent())); + Object.defineProperties(this, Object.getOwnPropertyDescriptors(new Agent(options))); this._options = options; if (typeof app === 'function') {