FEAT: Add first front end tests (FNW-108)#164
Draft
AubaneNourry wants to merge 8 commits intomainfrom
Draft
Conversation
not working atm, react-router-dom import issue using jest
…t-front-end-tests
…t-front-end-tests
Collaborator
Author
|
DRAFT SINCE NPX VITEST COMMAND DOESN'T WORK IN CI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes significant updates to the testing framework and dependencies of the
react-frontendproject. The primary changes involve switching from Jest to Vitest for testing, updating several dependencies, and adding new test files for various components and pages.Testing Framework Update:
.github/workflows/tests.yml: Changed the test command fromnpm test atonpx vitestto use Vitest instead of Jest.react-frontend/vitest.config.js: Added a new configuration file for Vitest to set up the testing environment.Dependency Updates:
react-frontend/package.json: Removed Jest-related dependencies and added Vitest,@testing-library/dom, andaxios. Updatedreact-router-domto version7.1.1. [1] [2] [3]Configuration Changes:
react-frontend/package.json: Removed Jest configuration and addedmoduleDirectoriesto simplify module resolution.New Test Files:
react-frontend/src/components/Navbar/navbar.test.tsx: Added tests for theNavbarcomponent, including rendering tests and navigation tests using Vitest and React Testing Library.react-frontend/src/pages/Login/login.test.tsx: Added tests for theLogincomponent, including rendering tests, error message tests, and navigation tests.react-frontend/src/pages/Signup/signup.test.tsx: Added tests for theSignupcomponent, including rendering tests, error message tests, and navigation tests.