Skip to content

feature: basic example app #1025

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

Merged
merged 16 commits into from
Jul 28, 2022
Merged

feature: basic example app #1025

merged 16 commits into from
Jul 28, 2022

Conversation

mdjastrzebski
Copy link
Member

Summary

Basic modern example for using RNTL. The app is generated from RN CLI template so there is some iOS/Android boilerplate but the benefit here is that we work on a real RN app and not an empty shell of it.

I also plan to use it as a base for refresh of other example apps.

Test plan

All checks and tests pass.

// for the action to complete.
// Hint: subsequent queries do not need to use `findBy`, because they are used after the async action
// already finished
expect(await screen.findByText('Welcome admin!')).toBeTruthy();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to expect everything, right? This reads better as a scenario to me:

Suggested change
expect(await screen.findByText('Welcome admin!')).toBeTruthy();
await screen.findByText('Welcome admin!'));

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah thats a good question, I'used that in a similar pattern as we suggest using expect(getByText()).toBeTruthy() to clarify the intent, despite the fact that simple getByText would do the same.

Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! For the ease of maintenance I'd strongly consider not committing the "android" and "ios" folders (we could generate those with init on demand) or use Expo

@mdjastrzebski
Copy link
Member Author

I've migrated the example to use Expo managed.

@mdjastrzebski mdjastrzebski requested a review from thymikee July 28, 2022 08:02
@mdjastrzebski mdjastrzebski requested a review from thymikee July 28, 2022 08:17
@mdjastrzebski mdjastrzebski merged commit 038ae4a into main Jul 28, 2022
@mdjastrzebski mdjastrzebski deleted the feature/example-basic branch July 28, 2022 08:24
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