Skip to content

feat(browser-react): export configure in non-pure entry#846

Merged
fi3ework merged 1 commit intomainfrom
npnpn
Jan 8, 2026
Merged

feat(browser-react): export configure in non-pure entry#846
fi3ework merged 1 commit intomainfrom
npnpn

Conversation

@fi3ework
Copy link
Copy Markdown
Member

@fi3ework fi3ework commented Jan 8, 2026

Summary

  • Export configure and RenderConfiguration type from default entry (not just /pure)
  • Replace examples/browser with examples/browser-react featuring React component testing
    • Add Counter component example with render, DOM queries, and userEvent usage
    • Add useToggle hook example with renderHook and act usage
  • Rewrite @rstest/browser-react README with clearer usage examples and API reference

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings January 8, 2026 12:24
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 8, 2026

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 05309e6
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/695fa3b97bec1f00081cada3
😎 Deploy Preview https://deploy-preview-846--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
Copy Markdown
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

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 configure and RenderConfiguration type from the default @rstest/browser-react entry
  • Replaces the basic examples/browser with a new examples/browser-react featuring 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.

@fi3ework fi3ework merged commit 31aa530 into main Jan 8, 2026
15 checks passed
@fi3ework fi3ework deleted the npnpn branch January 8, 2026 13:57
@9aoy 9aoy mentioned this pull request Jan 9, 2026
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