Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Oct 17, 2025

Summary

support show summary status when test running

image

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings October 17, 2025 10:42
@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 41f380f
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/68f225645b12030008a4594c
😎 Deploy Preview https://deploy-preview-626--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a 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`,
Copy link

Copilot AI Oct 17, 2025

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.

Copilot uses AI. Check for mistakes.
@9aoy 9aoy merged commit 1c94b81 into main Oct 20, 2025
16 checks passed
@9aoy 9aoy deleted the summary-status branch October 20, 2025 02:53
@9aoy 9aoy mentioned this pull request Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants