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

[libs/movex-react] Add spec for useMovex hook #104

Closed
2 tasks
GabrielCTroia opened this issue Oct 11, 2023 · 5 comments
Closed
2 tasks

[libs/movex-react] Add spec for useMovex hook #104

GabrielCTroia opened this issue Oct 11, 2023 · 5 comments
Assignees
Labels
good first issue Good for newcomers hacktoberfest Improvements that qualify for Hacktoberfest

Comments

@GabrielCTroia
Copy link
Contributor

Where

libs/movex-react/src/lib/hooks.ts

What

Add a simple test for the useMovex hook. Here'a guide to test hooks https://www.toptal.com/react/testing-react-hooks-tutorial

Why

Currently the hooks aren't tested at all, which means that any compiling or other errors introduced won't notify the CI, thus issues could easily be introduced.

Definition of done

  • running npx nx test movex-react will run the new test(s)
  • all other tests are still passing yarn test
@GabrielCTroia GabrielCTroia added good first issue Good for newcomers hacktoberfest Improvements that qualify for Hacktoberfest labels Oct 11, 2023
@Arol15
Copy link
Contributor

Arol15 commented Oct 11, 2023

@GabrielCTroia can I work on this, please?

@GabrielCTroia
Copy link
Contributor Author

Of course! 🙌

@Arol15
Copy link
Contributor

Arol15 commented Oct 13, 2023

@GabrielCTroia should I create a specs folder in src and add useMovex.spec.ts to it or just add useMovex.spec.ts to the location you mentioned libs/movex-react/src/lib/hooks.ts? I hope it's ok to ask these clarifying questions before making a commit.

@GabrielCTroia
Copy link
Contributor Author

GabrielCTroia commented Oct 13, 2023

HI @Arol15, thank you for your question – of course it's ok to ask!

I think it's best to create a specs folder next to lib and in it a hooks folder where you put the useMovex.spec.ts. So the final path would be libs/movex-react/src/specs/hooks/useMovex.spec.ts

Let me know if you have any other questions and thank you so much for your contribution! 🙌

@GabrielCTroia
Copy link
Contributor Author

Closed in #132

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 hacktoberfest Improvements that qualify for Hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants