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 pull request enhances the @rstest/browser-react package by making the configure function and RenderConfiguration type available in the default entry point (not just /pure), and provides comprehensive React testing examples.
Key changes:
- Exports
configureandRenderConfigurationtype from the default@rstest/browser-reactentry - Replaces the basic
examples/browserwith a newexamples/browser-reactfeaturing complete React component and custom hook testing examples - Significantly improves the README with clearer usage examples, detailed API documentation, and best practices
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/browser-react/src/index.ts | Adds configure function and RenderConfiguration type to default exports |
| packages/browser-react/README.md | Comprehensive rewrite with usage examples, API reference, and best practices |
| examples/browser-react/package.json | New React testing example with proper dependencies |
| examples/browser-react/src/Counter.tsx | Example React component for testing demonstrations |
| examples/browser-react/src/useToggle.ts | Example custom hook for testing demonstrations |
| examples/browser-react/tests/counter.test.tsx | Component testing example using render, DOM queries, and user-event |
| examples/browser-react/tests/hooks.test.tsx | Hook testing example using renderHook and act |
| examples/browser-react/rstest.config.ts | Configures React plugin and test file patterns |
| examples/browser-react/tsconfig.json | Adds JSX configuration and includes src directory |
| pnpm-lock.yaml | Updates dependencies for renamed/new example package |
| examples/browser/* | Removes old basic browser example (replaced by browser-react) |
| e2e/browser-mode/fixtures/browser-react/tests/testingLibraryDom.test.tsx | Updates comment to reflect recommended approach |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 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
configureandRenderConfigurationtype from default entry (not just/pure)examples/browserwithexamples/browser-reactfeaturing React component testingCountercomponent example withrender, DOM queries, anduserEventusageuseTogglehook example withrenderHookandactusage@rstest/browser-reactREADME with clearer usage examples and API referenceRelated Links
Checklist