My project folder structure is this:
-frontend
-src
-components
-__test__
-pages
-dialogs
- etc
in __test__ folder there are all the test cases for components like Editor.test.jsx etc. When I'm running this Editor.test.jsx file with Vite, using this command:
npx vitest run .\src\components\__test__\EditMenuForNotes.test.jsx
It's taking too much time to even run a single file. Output of this test file is this:
src/components/__test__/EditMenuForNotes.test.jsx (1 test) 126ms
✓ Edit Menu For Notes > renders delete, favorite, and pin icons with correct tooltips 124ms
Test Files 1 passed (1)
Tests 1 passed (1)
Start at 01:37:07
Duration 74.78s (transform 24.11s, setup 0ms, collect 72.86s, tests 126ms, environment 1.19s, prepare 214ms)
Itself test completes in 124ms but this collect time is 72.86sec. What is the issue of this? How can I solve this?