feat: show project name when running multiple projects#838
Merged
Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for displaying project names when running multiple projects. The implementation adds a showProjectName option to reporter configurations that is automatically enabled when more than one project is detected.
Key Changes
- Adds
showProjectNameoption to reporter types and enables it automatically for multi-project setups - Updates both DefaultReporter and VerboseReporter to support project name display
- Fixes a bug where project name was incorrectly read from context instead of the project object
- Adds name configuration to multiple test configuration files
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/types/reporter.ts | Adds showProjectName option to DefaultReporterOptions and defines VerboseReporterOptions type |
| packages/core/src/reporter/verbose.ts | Updates VerboseReporter constructor to handle options and pass showProjectName to logFileTitle |
| packages/core/src/reporter/index.ts | Updates DefaultReporter to pass showProjectName option to logFileTitle |
| packages/core/src/reporter/utils.ts | Adds showProjectName parameter to logFileTitle function to conditionally display project name |
| packages/core/src/core/rstest.ts | Moves reporter creation after project setup and sets showProjectName based on project count; renames parameter for clarity |
| packages/core/src/pool/index.ts | Fixes bug by using project.name instead of context.normalizedConfig.name |
| packages/vscode/rstest.config.ts | Adds name: 'vscode' to configuration |
| packages/core/rstest.config.ts | Adds name: 'core' to configuration |
| packages/browser/rstest.config.ts | Adds name: 'browser' to configuration |
| packages/adapter-rslib/rstest.config.ts | Adds name: 'rslib' to configuration |
| e2e/projects/index.test.ts | Updates test to verify project name display in multi-project scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rstest into show-project-name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
support show project name when running multiple projects.
Related Links
Checklist