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

Testing Setup with Vitest & React Testing Library #7

Closed
ThomasCode92 opened this issue Oct 9, 2024 · 0 comments · Fixed by #9
Closed

Testing Setup with Vitest & React Testing Library #7

ThomasCode92 opened this issue Oct 9, 2024 · 0 comments · Fixed by #9
Assignees

Comments

@ThomasCode92
Copy link
Owner

ThomasCode92 commented Oct 9, 2024

Implement Vitest as the testing framework for the project. Vitest is a Vite-native unit testing framework designed to improve test speed and integration with modern tooling.
The React Testing Library is a lightweight solution for testing React components. It offers simple utility functions built on top of react-dom and react-dom/test-utils, promoting better testing practices.

Tasks

  • Install Vitest as a development dependency.
  • Update `package.json to include the appropriate script for running tests.
  • Configure Vitest by using the vite.config.ts file.
  • Set up React Testing Library to work alongside Vitest for testing React components.
  • Add basic tests for existing components to confirm the setup is functioning as expected.
  • Run the tests to verify that everything is working properly.

Expected Outcome

  • Vitest is installed and properly configured.
  • A basic test (using React Testing Library) successfully runs, confirming that the setup works..
  • A test command is included in the package.json file for future use.

Tooling

  • Install and configere the eslint-plugin-vitest
  • Install and configure the eslint-plugin-testing-library

References

@ThomasCode92 ThomasCode92 self-assigned this Oct 17, 2024
@ThomasCode92 ThomasCode92 changed the title Setup Testing with Vitest Testing Setup with Vitest Oct 17, 2024
@ThomasCode92 ThomasCode92 changed the title Testing Setup with Vitest Testing Setup with Vitest & React Testing Library Oct 17, 2024
@ThomasCode92 ThomasCode92 linked a pull request Oct 17, 2024 that will close this 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

Successfully merging a pull request may close this issue.

1 participant