Comments (3)
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.
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.
@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)
- correct type for `import { defineConfig } from 'vitest/config';` with `"type": "commonjs"` HOT 1
- Pass down context to `onTestFinished` and `onTestFailed` instead of test result
- Some coverage.exclude glob patterns not matching for vitest 2 workspace HOT 4
- TypeError: Unknown file extension ".css"
- `tsc` with `"vitest"` version 2 requires `"@types/node"` to run without errors HOT 2
- Add 'coverageLinkUrl' option in Vitest UI for custom coverage report links
- Improve Vitest Public API
- Browser docs refer to defineCommand function which doesn't exist
- False negative with typecheck enabled HOT 4
- (v2) `Error: Failed to load url` when dynamic importing js files generated during tests with relative path HOT 4
- Istanbul: Coverage ignore doesn't work for default in switch HOT 3
- Type error on mockImplementation with call signature in object type HOT 3
- Vitest failing to bundle nested dependency while Vite succeeds HOT 2
- Scoped Fixtures HOT 2
- Vitest v2 reports zero coverage for types-only TypeScript files HOT 7
- Vitest v2 coverage is reporting 'Unexpected reserved word' error HOT 4
- [@vitest/web-worker] Cannot acces the crypto API from vitest web worker HOT 1
- Coverage report does not include types-only TS files HOT 1
- Global coverage threshold should not exclude glob based thresholds HOT 1
- Support 100 shorthand option for pattern based coverage rules HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vitest.