diff --git a/docs/media/testCoverage.png b/docs/media/testCoverage.png new file mode 100644 index 0000000..7d4ef0f Binary files /dev/null and b/docs/media/testCoverage.png differ diff --git a/docs/tests.md b/docs/tests.md index 2283d9b..f2ba470 100644 --- a/docs/tests.md +++ b/docs/tests.md @@ -50,6 +50,7 @@ TODO! ### To run tests with test coverage +- `cd frontend` - `npm run test -- --coverage` ### To run tests with test coverage if not all tests are running @@ -58,5 +59,7 @@ TODO! ## Test coverage -The table below shows the test coverage for the application. The test coverage is overall above XX%. -**Table** +The table below shows the test coverage for the application. Overall statement and line coverage is above 80%, while branch (66%) and function (74%) coverage is lower. +Files with coverage below 80% will be prioritized for further testing to bring their coverage up. + +![Test coverage](media/testCoverage.png) diff --git a/frontend/src/AppRoutes.tsx b/frontend/src/AppRoutes.tsx index bae4a32..fcc3320 100644 --- a/frontend/src/AppRoutes.tsx +++ b/frontend/src/AppRoutes.tsx @@ -1,7 +1,7 @@ import { Route, Routes } from "react-router-dom"; import PlantMatchPage from "./pages/plantMatch/PlantMatchPage.tsx"; import ExplorePlants from "./pages/explorePlants/ExplorePlants.tsx"; -import MyMatchesPage from "./pages/MyMatches/MyMatchesPage.tsx"; +import MyMatchesPage from "./pages/myMatches/MyMatchesPage.tsx"; import Profile from "./pages/profile/Profile.tsx"; // eslint-disable-next-line react-refresh/only-export-components diff --git a/frontend/src/tests/test_profile/__snapshots__/Profile.test.tsx.snap b/frontend/src/tests/test_profile/__snapshots__/Profile.test.tsx.snap deleted file mode 100644 index 51357ca..0000000 --- a/frontend/src/tests/test_profile/__snapshots__/Profile.test.tsx.snap +++ /dev/null @@ -1,102 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Profile page > matches snapshot 1`] = ` -
-
-
- profile.imageAlt -
-

- - profile.name -

-

- - profile.description - -

-
-
-
- - -
-
-

- preferences.title -

-
- - - - - - - - - -
-
-
-
-`;