Skip to content

Commit 4b8cae0

Browse files
committed
fix: failed runner tests
1 parent 64aa64b commit 4b8cae0

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

lib/command/workers/runTests.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,22 @@ const Codecept = require(process.env.CODECEPT_CLASS_PATH || '../../codecept')
2323
const { options, tests, testRoot, workerIndex, poolMode } = workerData
2424

2525
// hide worker output
26-
// In pool mode, always hide worker output to prevent duplicate output
26+
// In pool mode, only suppress output if debug is NOT enabled
2727
// In regular mode, hide result output but allow step output in verbose/debug
28-
if (poolMode || (!options.debug && !options.verbose)) {
28+
if (poolMode && !options.debug) {
29+
// In pool mode without debug, suppress only result summaries and failures, but allow Scenario Steps
30+
const originalWrite = process.stdout.write
31+
process.stdout.write = string => {
32+
// Always allow Scenario Steps output
33+
if (string.includes('Scenario Steps:')) {
34+
return originalWrite.call(process.stdout, string)
35+
}
36+
if (string.includes(' FAIL |') || string.includes(' OK |') || string.includes('-- FAILURES:') || string.includes('AssertionError:') || string.includes('◯ File:')) {
37+
return true
38+
}
39+
return originalWrite.call(process.stdout, string)
40+
}
41+
} else if (!poolMode && !options.debug && !options.verbose) {
2942
process.stdout.write = string => {
3043
stdout += string
3144
return true

0 commit comments

Comments
 (0)