Skip to main content
added 81 characters in body; edited tags
Source Link
jonrsharpe
  • 123.3k
  • 31
  • 277
  • 488

Why my vitest is Vitest taking too much time to run even a single test file?

My project folder structure is this: -frontend -src -components -test -pages -dialogs - etc in

-frontend
  -src
     -components
        -__test__
     -pages
     -dialogs
     - etc

in test__test__ folder there are all the test cases for components like Editor.test.jsxEditor.test.jsx etc. When i'mI'm running this Editor.test.jsxEditor.test.jsx file with viteVite, using this command: npx vitest run .\src\components_test_\EditMenuForNotes.test.jsx

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

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)

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?

Why my vitest is taking too much time to run even a single test file?

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?

Why is Vitest taking too much time to run even a single test file?

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?

Source Link

Why my vitest is taking too much time to run even a single test file?

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?