Skip to content

Commit bee6357

Browse files
Always show summary output in CI mode when all tests pass (#126)
Previously, non-interactive mode produced no output when all tests passed (only failures or `—verbose` triggered output). Every major JS testing framework always prints at least a summary — align with that convention. Also document `—verbose` flag in `SKILL.md` so AI agents know it exists.
1 parent 298beae commit bee6357

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ tests: rawCases.map(c => ({ ...c, expect: referenceImpl(c.arg) })),
352352
npx htest test/file.js # Single file
353353
npx htest test/ # All JS in directory (not recursive, skips index*)
354354
npx htest test/index.js # Use index files for recursive aggregation
355-
npx htest test/file.js --ci # CI mode: exits with code 1 on failure
355+
npx htest test/file.js --ci # Force non-interactive mode (automatic in non-TTY environments)
356+
npx htest test/file.js --verbose # Show all tests, including passing
356357
```
357358
358359
---

src/env/node.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,11 @@ export default {
135135

136136
if (!isInteractive) {
137137
if (root.stats.pending === 0) {
138-
if (root.stats.fail > 0 || options.verbose) {
139-
let messages = root.toString(options);
140-
let tree = getTree(messages).toString();
141-
tree = format(tree);
138+
let messages = root.toString(options);
139+
let tree = getTree(messages).toString();
140+
tree = format(tree);
142141

143-
console[root.stats.fail > 0 ? "error" : "log"](tree);
144-
}
142+
console[root.stats.fail > 0 ? "error" : "log"](tree);
145143

146144
process.exit(root.stats.fail > 0 ? 1 : 0);
147145
}

0 commit comments

Comments
 (0)