fix(reporter): don't print all dots in one line#31
Conversation
CI systems like GitHub Actions only print a line when a newline character is printed. Add a newline character after each 100 dots to flush output mid-test. Also, fix the lockfile (without it, CI doesn't pass). Fixes jquerygh-30
There was a problem hiding this comment.
Pull request overview
Improves the test runner’s progress reporter output so CI logs flush periodically during long pass-only runs, and updates package-lock.json so dependency installation succeeds in CI.
Changes:
- Add a dot writer helper that inserts a newline after every 100 passed tests to encourage CI log flushing.
- Regenerate/fix
package-lock.jsonentries (including updating@simple-libs/stream-utilsto1.2.0and removing variouspeermarkers).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| reporter.js | Adds dot batching/newline flushing logic for CI visibility. |
| package-lock.json | Updates lockfile metadata/entries to restore passing CI installs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let currDots = 0; | ||
| function writeDot() { | ||
| if ( currDots >= MAX_DOTS_PER_LINE ) { | ||
|
|
||
| // Write a newline character occasionally to force a CI output flush. | ||
| process.stdout.write( "\n" ); | ||
| currDots = 0; | ||
| } | ||
| currDots++; | ||
| process.stdout.write( "." ); | ||
| } |
There was a problem hiding this comment.
currDots is module-global state but it’s never reset when non-dot output is printed (e.g., failing tests call console.log("\n\n..." ), and callers like run.js also print blank lines/warnings). This can desync the dot counter from the actual line state and lead to extra/blank newlines being inserted by writeDot() (e.g., after exactly 100 dots and then a failure message). Consider resetting currDots = 0 whenever the reporter emits non-dot output (before console.log/console.error in this module), or exposing a small reset helper that call sites can use before printing their own output.
There was a problem hiding this comment.
I didn't want to complicate other logging, so this is a tradeoff I made on purpose. We'd have to create a wrapper logging function & use it instead of console. Doable, but I'm not sure it's worth it.
There was a problem hiding this comment.
It could perhaps reset the counter on reportEnd or reportError.
There was a problem hiding this comment.
That won't cover all cases, like QUnit printing to the console, but these two are common enough that maybe we could handle them.
|
@timmywil could you release a new version? I am thinking about this PR each time I'm looking at jQuery Browser Tests workflow while it's running. 😉 |



CI systems like GitHub Actions only print a line when a newline character is printed. Add a newline character after each 100 dots to flush output mid-test.
Also, fix the lockfile (without it, CI doesn't pass).
Fixes gh-30