Giter VIP home page Giter VIP logo

Comments (3)

sheremet-va avatar sheremet-va commented on August 16, 2024

It's absolutely normal to have times after duration be higher than duration since they are aggregated across all test file which are loaded in parallel.

What is not normal is how high the number is 🤔

from vitest.

sheremet-va avatar sheremet-va commented on August 16, 2024

What is not normal is how high the number is 🤔

After investigation, I didn't find anything unexpected. When running a single test, prepare time is faster than if running multiple in parallel, and you have a lot of files without a test inside, so we basically run a lot of files for nothing which inflates the number.

Also, looking at your project I would recommend disabling isolation with --no-isolate to drastically speed up your tests (prepare state would be very minimal since we only need to run it once and can cache it for every test)

from vitest.

jhonnymoreira avatar jhonnymoreira commented on August 16, 2024

@sheremet-va, thanks for looking into the "issue" and explaining how it works internally. I'll try the option you mentioned. ;)

Have a great week!


Edit

The test duration was drastically reduced. Thank you!

 Test Files  17 passed | 55 skipped (72)
      Tests  48 passed (48)
   Start at  14:04:04
   Duration  1.51s (transform 2.02s, setup 5ms, collect 2.94s, tests 80ms, environment 10ms, prepare 10.41s)

from vitest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.