-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: update testing library #6844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request updates the react-native testing library dependency from version 13.2.0 to 13.3.3 and refactors the snapshot generation code to use asynchronous rendering with Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5–10 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.rnstorybook/generateSnapshots.tsx (1)
3-3: Async snapshot generation withrenderAsynclooks correctSwitching to
renderAsyncwith anasynctest and awaiting the render matches the React Native Testing Library 13.3+ recommendations for React 19/Suspense.const rendered = await renderAsync(...)followed byrendered.toJSON()is a valid pattern; no additional changes are required here.If you later standardize on
screen, you could also write:import { renderAsync, screen } from '@testing-library/react-native'; test(`${name} should match snapshot`, async () => { await renderAsync(React.createElement(story as React.ComponentType)); expect(screen.toJSON()).toMatchSnapshot(); });Also applies to: 16-18
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (2)
app/containers/message/__snapshots__/Message.test.tsx.snapis excluded by!**/*.snapyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (2)
.rnstorybook/generateSnapshots.tsx(2 hunks)package.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: ESLint and Test / run-eslint-and-test
- GitHub Check: format
🔇 Additional comments (1)
package.json (1)
169-169: This review comment references unchanged code and contains inaccurate technical claims.The
@testing-library/react-nativedependency at line 169 was not modified in this PR (package.json shows no changes). Additionally, the comment's technical premise is unsupported:renderAsyncis not used anywhere in the codebase, andreact-test-rendereris not listed as a project dependency. The suggestions to verify lockfile updates and test runs are unnecessary since no changes were made to package.json.Likely an incorrect or invalid review comment.
Proposed changes
Issue(s)
How to test or reproduce
Screenshots
Types of changes
Checklist
Further comments
Need this for #6837
Summary by CodeRabbit
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.