Skip to content

Conversation

@Rohit3523
Copy link
Collaborator

@Rohit3523 Rohit3523 commented Dec 6, 2025

Proposed changes

Issue(s)

How to test or reproduce

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Need this for #6837

Summary by CodeRabbit

  • Tests

    • Updated snapshot generation to use asynchronous rendering.
  • Chores

    • Upgraded testing library dependency to latest version.

✏️ Tip: You can customize this high-level summary in your review settings.

@Rohit3523 Rohit3523 requested a deployment to approve_e2e_testing December 6, 2025 19:01 — with GitHub Actions Waiting
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 6, 2025

Walkthrough

The 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 renderAsync instead of the synchronous render method.

Changes

Cohort / File(s) Summary
Testing & Dependencies
.rnstorybook/generateSnapshots.tsx, package.json
Updated @testing-library/react-native to v13.3.3 and migrated snapshot generation from sync render to renderAsync, making the test callback async and awaiting the rendering result.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5–10 minutes

  • Version bump in package.json is straightforward
  • Async migration is a consistent, single-pattern change across one file
  • No complex logic or behavioral changes involved

Suggested reviewers

  • diegolmello

Poem

🐰 With async awaits and versions anew,
Our snapshots now render in ways that are true,
Testing library hops to 13.3,
Swift async calls make our tests run free!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: update testing library' clearly and concisely summarizes the main change—updating the testing library dependency and related code changes.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-testing-library

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Rohit3523 Rohit3523 marked this pull request as ready for review December 6, 2025 19:01
@Rohit3523 Rohit3523 marked this pull request as draft December 6, 2025 19:01
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 with renderAsync looks correct

Switching to renderAsync with an async test and awaiting the render matches the React Native Testing Library 13.3+ recommendations for React 19/Suspense. const rendered = await renderAsync(...) followed by rendered.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.

📥 Commits

Reviewing files that changed from the base of the PR and between 1bd62a2 and 492b7c9.

⛔ Files ignored due to path filters (2)
  • app/containers/message/__snapshots__/Message.test.tsx.snap is excluded by !**/*.snap
  • yarn.lock is 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-native dependency at line 169 was not modified in this PR (package.json shows no changes). Additionally, the comment's technical premise is unsupported: renderAsync is not used anywhere in the codebase, and react-test-renderer is 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.

@Rohit3523 Rohit3523 requested a deployment to official_android_build December 6, 2025 19:05 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_ios_build December 6, 2025 19:05 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_android_build December 6, 2025 19:05 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants