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

Decide on Unit Tests #212

Closed
Monstarrrr opened this issue Jun 21, 2024 · 2 comments
Closed

Decide on Unit Tests #212

Monstarrrr opened this issue Jun 21, 2024 · 2 comments
Assignees
Labels
decision For tracking decisions [ documentation / Improvements or additions to documentation

Comments

@Monstarrrr
Copy link
Owner

Monstarrrr commented Jun 21, 2024

Which Unit Testing Solution to use on the Front-end ?

Context

Important decision because once chosen we won't be able to switch unless we rewrite a lot of code, presumably.

Decision Drivers

  • Ease of use
  • Scalability
  • Performance

Considered Options

Jest


Jest is the default testing framework for NextJS

Ease of use:

  • 🟢 Easy to setup

Vitest


Vitest is a newer testing framework using vite

Ease of use:

  • 🟠 Requires more setup than Jest

Performance

  • 🟢 Faster than Jest

None


No unit tests

Ease of use:

  • 🟢 No use needed

Scalability:

  • 🟢 Unit tests in React aren't good ROI.

  • 🟢 Won't use unit tests unless we have specific complex functions to test, which we don't have (yet).

  • 🟠 Unit tests could facilitate refactoring and maintainability in the long run

Decision Outcome

Chosen option: "None (until a complex pure function is added)"
Reason: It may be too time consuming to setup unit tests for the MVP if we don't have complex pure functions we need to test.

Positive Consequences

  • Faster MVP release

Negative Consequences

@Monstarrrr Monstarrrr added the decision For tracking decisions label Jun 21, 2024
@Monstarrrr Monstarrrr self-assigned this Jun 21, 2024
@Monstarrrr Monstarrrr added the [ documentation / Improvements or additions to documentation label Jun 21, 2024
@Monstarrrr
Copy link
Owner Author

Need your confidence levels then close 😃

@purple-void
Copy link
Collaborator

Seems like unit testing is nice for confirmation and to make the code possibility more understandable, but we are fine without it "until a complex pure function is added"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decision For tracking decisions [ documentation / Improvements or additions to documentation
Projects
Status: Done
Development

No branches or pull requests

3 participants