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

Create a stateful counter button with unit tests and update README #25

Open
3 of 5 tasks
achan214 opened this issue Feb 11, 2025 · 0 comments
Open
3 of 5 tasks

Comments

@achan214
Copy link
Contributor

achan214 commented Feb 11, 2025

Description

Incremental testing done by developers themselves can prevent big bugs later on that have to be fixed. We would like you guys to start implementing testing before pushing your code! This is an example issue for you guys to practice testing.

  • Create a simple counter button on a new page page in /src/app/[username]/page.tsx
  • Write a unit test to validate that the button functions properly

Acceptance Criteria

  • A new frontend route is created and contains a button that increments a counter on click

Steps:

  • Create a new branch to work on in the form username-intro(e.g. achan214-intro)
  • Create a new route as /src/app/[username]/page.tsx
  • Create the new button on this new page using the button component from shadcn. The button text should be the counter, which you can start at 0
  • Create a test file page.test.tsx in /test/app/[username]. Use jest to test that the button increments on click
  • Make a PR, we will not merge your code but we want to see that you have completed the example issue
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

No branches or pull requests

1 participant