From 4ec7d848827d5fa714341e3b676637947c9df3a1 Mon Sep 17 00:00:00 2001 From: kobenguyent Date: Fri, 29 Dec 2023 10:33:23 +0100 Subject: [PATCH 1/2] fix: step arg is a function --- lib/command/workers/runTests.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/command/workers/runTests.js b/lib/command/workers/runTests.js index a2ea9e409..9043e2554 100644 --- a/lib/command/workers/runTests.js +++ b/lib/command/workers/runTests.js @@ -145,7 +145,13 @@ function initializeListeners() { if (step.args) { for (const arg of step.args) { - arg && arg.$_root ? _args.push(JSON.stringify(arg).slice(0, 300)) : _args.push(arg); + if (arg && arg.$_root) { + _args.push(JSON.stringify(arg).slice(0, 300)); + } else if (arg && typeof arg === 'function') { + _args.push(arg.name); + } else { + _args.push(arg); + } } } From 6a8012220f4944851f4eae6470ba452c1e924c16 Mon Sep 17 00:00:00 2001 From: kobenguyent Date: Fri, 29 Dec 2023 10:43:09 +0100 Subject: [PATCH 2/2] fix: step arg is a function --- lib/command/workers/runTests.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/command/workers/runTests.js b/lib/command/workers/runTests.js index 9043e2554..0e67d25d0 100644 --- a/lib/command/workers/runTests.js +++ b/lib/command/workers/runTests.js @@ -145,8 +145,10 @@ function initializeListeners() { if (step.args) { for (const arg of step.args) { + // check if arg is a JOI object if (arg && arg.$_root) { _args.push(JSON.stringify(arg).slice(0, 300)); + // check if arg is a function } else if (arg && typeof arg === 'function') { _args.push(arg.name); } else {