From 4e677dac0bfe274c0a153ff28b3172796505e4dd Mon Sep 17 00:00:00 2001 From: Ameterezu Date: Fri, 20 Nov 2020 22:00:46 +0300 Subject: [PATCH 1/3] Add reporting support for run-workers Add reporting support for run-workers. Can be used to generate junit reports. Example command: npx codeceptjs run-workers 2 --reporter mocha-junit-reporter --- bin/codecept.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/codecept.js b/bin/codecept.js index a6c63d5eb..b1e0a3737 100755 --- a/bin/codecept.js +++ b/bin/codecept.js @@ -131,6 +131,8 @@ program.command('run-workers ') .option('--tests', 'run only JS test files and skip features') .option('--profile [value]', 'configuration profile to be used') .option('-p, --plugins ', 'enable plugins, comma-separated') + .option('-O, --reporter-options ', 'reporter-specific options') + .option('-R, --reporter ', 'specify the reporter to use') .action(require('../lib/command/run-workers')); program.command('run-multiple [suites...]') From 7580528f00b44088ffd2c598915490ae928f2ebd Mon Sep 17 00:00:00 2001 From: Ameterezu Date: Mon, 23 Nov 2020 16:15:10 +0300 Subject: [PATCH 2/3] Fix method loop --- lib/plugin/commentStep.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/plugin/commentStep.js b/lib/plugin/commentStep.js index 6a9183f35..14ad5dc20 100644 --- a/lib/plugin/commentStep.js +++ b/lib/plugin/commentStep.js @@ -107,6 +107,9 @@ module.exports = function (config) { event.dispatcher.on(event.step.started, (step) => { if (currentCommentStep) { const metaStep = getRootMetaStep(step); + + if (metaStep === currentCommentStep) return; + metaStep.metaStep = currentCommentStep; } }); From adb46bee4319188b316d2bb2c36e001d7597035a Mon Sep 17 00:00:00 2001 From: Ameterezu Date: Tue, 24 Nov 2020 11:34:39 +0300 Subject: [PATCH 3/3] Change if --- lib/plugin/commentStep.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plugin/commentStep.js b/lib/plugin/commentStep.js index 14ad5dc20..e1d3f54a0 100644 --- a/lib/plugin/commentStep.js +++ b/lib/plugin/commentStep.js @@ -108,9 +108,9 @@ module.exports = function (config) { if (currentCommentStep) { const metaStep = getRootMetaStep(step); - if (metaStep === currentCommentStep) return; - - metaStep.metaStep = currentCommentStep; + if (metaStep !== currentCommentStep) { + metaStep.metaStep = currentCommentStep; + } } });