Skip to content

Commit c67bcc8

Browse files
authored
fix: make custom jest reporter more agent friendly (#411)
make the custom reporter a bit less silent on successful runs to avoid confusing agents like jetbrains junie... ``` However, when running the tests via `pnpm test`, I'm getting no output after the command, which is unexpected. I need to investigate why Jest is not producing output or if the tests are actually running. I previously saw `FAIL` so it should be working. Wait, the previous `pnpm test` output showed `FAIL` but the most recent ones are silent. This might be due to how `pnpm` handles the output or some caching. I'll try running jest directly if allowed, or check the exit code. ... ``` (proceeds to try various ways of running the tests, not realizing that the custom reporter was purposefully silencing output from passed tests)
1 parent d93d4d3 commit c67bcc8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

jest/reporter.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ class Reporter extends DefaultReporter {
55
// silence console output from tests that passed
66
if (result.numFailingTests === 0 && !result.testExecError) {
77
result.console = []
8-
} else {
9-
// biome-ignore lint/complexity/noArguments: we want to pass through
10-
super.printTestFileHeader(...arguments)
118
}
9+
// biome-ignore lint/complexity/noArguments: we want to pass through
10+
super.printTestFileHeader(...arguments)
1211
}
1312
}
1413

0 commit comments

Comments
 (0)