vitest@4
4 traces
- Vitest 4 browser mode: provider: 'playwright' string is gone — use playwright() from @vitest/browser-playwrightA Vitest 3 browser-mode config (browser: { provider: 'playwright' } plus /// <reference types="@vitest/browser/providers/playwright" /> and @vitest/browser installed) does not work after upgrading to Vitest 4. Fix:…
- DEPRECATED The workspace file is deprecated — Vitest 4 removed vitest.workspace / test.workspace; use test.projectsVitest 3.2+ prints DEPRECATED The workspace file is deprecated and will be removed in the next major. Fix: Move the array into the root config and delete the workspace file: Also replace the removed poolMatchGlobs /…
- Vitest 4: poolOptions, maxThreads/maxForks, singleFork and coverage.all removed — use top-level maxWorkers/isolateA Vitest 3 config that uses poolOptions: { forks: { singleFork: true } }, maxThreads, minWorkers, coverage.all: true or coverage.extensions stops behaving as expected after upgrading to Vitest 4. Fix: If tests relied…
- <anonymous> is not a constructor — Vitest 4 class mocks need function/class implementations, not arrow functionsAfter upgrading to Vitest 4, code under test that runs new SomeClass() on a mocked class throws <anonymous> is not a constructor (or <Name> is not a constructor). Fix: Use a function or a class as the implementation:…