Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Add `--browser.enabled`, `--browser.name`, `--browser.headless`, `--browser.port`, `--browser.strictPort` CLI options - Support `--browser` as shorthand alias for `--browser.enabled` - Extract `BrowserName` type to reduce duplication across config types - Move browser options handling to `mergeWithCLIOptions` for multi-project support - Add unit tests for browser CLI options parsing
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive CLI support for browser mode configuration options, allowing users to configure browser testing via command-line flags instead of only through config files. The changes enable fine-grained control over browser settings including browser type, headless mode, port configuration, and strict port behavior.
Changes:
- Added 5 new CLI flags (
--browser.enabled,--browser.name,--browser.headless,--browser.port,--browser.strictPort) while maintaining backward compatibility with the existing--browserboolean flag - Extracted
BrowserNametype into a reusable type definition to ensure consistency across the codebase - Moved browser options handling from
resolveConfigtomergeWithCLIOptionsto properly support multi-project configurations
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/core/src/types/config.ts | Extracted BrowserName type for reuse across browser configuration types, improving type consistency and maintainability |
| packages/core/src/cli/commands.ts | Added CLI option definitions for browser configuration with appropriate help text |
| packages/core/src/cli/init.ts | Updated CommonOptions type to support both boolean and object browser options; moved browser option merging logic to mergeWithCLIOptions for multi-project support |
| packages/core/tests/cli/init.test.ts | Added comprehensive test coverage for browser CLI options including boolean shorthand, full object configuration, and override behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
--browser.enabled,--browser.name,--browser.headless,--browser.port,--browser.strictPortCLI options--browseras shorthand alias for--browser.enabledBrowserNametype to reduce duplication across config typesmergeWithCLIOptionsfor multi-project supportRelated Links
Checklist