From eaecb71e6fc83d48da4ea19d8001ca1f2c6fb3a8 Mon Sep 17 00:00:00 2001 From: Justin Wind Date: Sun, 11 May 2025 15:00:14 -0700 Subject: [PATCH] stub contexts return values --- test/stub.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/stub.js b/test/stub.js index aa8f548..352d951 100644 --- a/test/stub.js +++ b/test/stub.js @@ -108,12 +108,12 @@ function stubCreator(Abstract, metadata = stubMetadata()) { this._sinonInit(); } - async context(fn) { - await fn({}); + async context(fn, ...args) { + return await fn({}, ...args); } - async transaction(dbCtx, fn) { - await fn(dbCtx); + async transaction(dbCtx, fn, ...args) { + return await fn(dbCtx, ...args); } _sinonInit() { -- 2.49.0