Skip to content
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

docs: add jotai to cookbook #1634

Merged
merged 4 commits into from
Jul 12, 2024
Merged

Conversation

vanGalilea
Copy link
Contributor

Summary

This PR adds a new example to the React Native Testing Library cookbook section, demonstrating how to test a component that utilizes Jotai for state management.

The example consists of a simple to-do list component, showcasing how to manage state using Jotai atoms. In addition to the example app, the PR includes corresponding tests to validate the functionality of the to-do list and utility functions to initialize Jotai atoms with predefined values.

Comprehensive documentation is also provided, explaining each step and the underlying concepts of using Jotai with React Native Testing Library.

Test plan

  • Inspect the new add recipe, ensure readability and that everything is coherent
  • Inspect examples, utils and tests to adhere RNTL's standard

@vanGalilea vanGalilea mentioned this pull request Jul 5, 2024
19 tasks
Copy link

codecov bot commented Jul 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.39%. Comparing base (a282d1e) to head (9e8e2aa).
Report is 40 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1634      +/-   ##
==========================================
- Coverage   95.51%   95.39%   -0.13%     
==========================================
  Files          99      100       +1     
  Lines        5400     5433      +33     
  Branches      857      867      +10     
==========================================
+ Hits         5158     5183      +25     
- Misses        242      250       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vanGalilea
Copy link
Contributor Author

"Validate Example Apps / Test Example (cookbook) (pull_request)" failed due to

➤ YN0000: Yarn detected that the current workflow is executed from a public pull request. For safety the hardened mode has been enabled.

@mdjastrzebski can you re-run it please? As I needed to install Jotai for example purposes

Thanks in advance!

@mdjastrzebski
Copy link
Member

@vanGalilea awesome PR ❤️ The code sample strikes a good balance between simplicity and real-life setup, the description is clear and informative. I plan to merge and publish it this week. In the meantime I've left some minor comments.

@vanGalilea
Copy link
Contributor Author

Thanks for the feedback, I'll resolve it ASAP 👍🏻

@vanGalilea vanGalilea requested a review from mdjastrzebski July 9, 2024 07:37
@vanGalilea
Copy link
Contributor Author

@mdjastrzebski ready to roll 👍🏻

@mdjastrzebski mdjastrzebski merged commit d31c05a into callstack:main Jul 12, 2024
7 checks passed
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