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

Write unit tests #7

Open
5 tasks done
watadarkstar opened this issue Jul 28, 2021 · 3 comments
Open
5 tasks done

Write unit tests #7

watadarkstar opened this issue Jul 28, 2021 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed testing

Comments

@watadarkstar
Copy link
Collaborator

watadarkstar commented Jul 28, 2021

We are always interested in people writing more unit tests 😄

Here are some good and easy places to write unit tests:

  • useMsToTime.ts
  • useMsToMinutes.ts

Here are some good and easy places to write component tests:

  • LoadingScreen.tsx
  • Screen.tsx
  • Themed.tsx

But before writing any component tests I highly recommend we complete issue #43 and setup React Native Testing Library.

@watadarkstar watadarkstar added good first issue Good for newcomers help wanted Extra attention is needed labels Jul 28, 2021
@EmersonPinheiro
Copy link
Contributor

Hello there!

First of all, thanks for sharing this project with the React Native community.
This is the first time that I contribute to an open source project, and, since I was looking for an opportunity to start learning unit testing for React Native, this issue seems to be a good one. But, I'm new in this open source world, so I have a few questions.
First of all, in the case of writing tests for the application, does my first unit test PR needs to cover all components/screens? If it doesn't, do I need to close this issue (like is said in the pull request template), or do I just need to reference it (e.g. writing "Relates to #7" in the Ticket Link section)?
Thank you in advance.

@watadarkstar
Copy link
Collaborator Author

Hey @EmersonPinheiro :) Yeah this issue is a bit vague. Let's get more specific. Have you ever used React Native Testing Library? Maybe you can set that up!

See this issue I just created: #43

If we can set that up then we can start writing component tests.

Otherwise you could write some unit tests for our hooks. For example:

  • useMsToTime
  • useMsToMinutes

And to answer your question. Yes just write "Related to #7"

Namaste! 🧘‍♂️

@akashroy1
Copy link

Is the issue still open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed testing
Projects
None yet
Development

No branches or pull requests

3 participants