5

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?

1
  • Not sure why you got the downvote. It's something I experience too. Perhaps you could provide more information. Could you provide your system specs, as well as a repo that reproduces the issue? Commented Apr 22 at 17:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.