-
-
Notifications
You must be signed in to change notification settings - Fork 14
feat: support show summary status when test running #626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a running summary to the status output so users can see aggregate progress (files and duration) while tests execute.
- Emit onTestFileStart from the worker (before loading), remove the runner hook and propagate results directly to the status renderer.
- Extend StatusRenderer to track finished modules, render a summarized “Test Files” line and elapsed “Duration,” and update reporters to use onTestFileResult.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/types/runner.ts | Removes onTestFileStart from RunnerHooks, narrowing the runner hook surface. |
| packages/core/src/runtime/worker/index.ts | Emits onTestFileStart via RPC before loading files; removes hook plumbing to runner. |
| packages/core/src/runtime/runner/runner.ts | Drops internal onTestFileStart hook invocation. |
| packages/core/src/reporter/verbose.ts | Uses statusRenderer.onTestFileResult to update status. |
| packages/core/src/reporter/index.ts | Uses statusRenderer.onTestFileResult to update status. |
| packages/core/src/reporter/statusRenderer.ts | Implements summary rendering (running modules, test file counts, duration) and tracks finished tests. |
Comments suppressed due to low confidence (1)
packages/core/src/reporter/statusRenderer.ts:1
- [nitpick] The repeated magic number 11 in padStart makes alignment assumptions implicit. Consider extracting a constant (e.g., const LABEL_WIDTH = 11) to clarify intent and avoid scattered literals.
import { relative } from 'pathe';
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| if (this.testModules.length === 0) { | ||
| summary.push( | ||
| `${color.gray('Test Files'.padStart(11))} ${this.runningModules.size} total`, |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The repeated magic number 11 in padStart makes alignment assumptions implicit. Consider extracting a constant (e.g., const LABEL_WIDTH = 11) to clarify intent and avoid scattered literals.
Co-authored-by: Copilot <[email protected]>
Summary
support show summary status when test running
Related Links
Checklist