You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
vite.config.ts
file.Expected Outcome
package.json
file for future use.Tooling
eslint-plugin-vitest
eslint-plugin-testing-library
References
The text was updated successfully, but these errors were encountered: