Closed nicojs closed 11 months ago
I'm getting this issue on all versions from beta.1
to beta.5
and have the latest version of "pretty-format" in my resolutions. Are you sure this is the cause?
↪ yarn why pretty-format 3875ms ~ 16:23:41 ~ 28 Nov
yarn why v1.22.19
[1/4] 🤔 Why do we have the module "pretty-format"...?
[2/4] 🚚 Initialising dependency graph...
warning Resolution field "pretty-format@29.7.0" is incompatible with requested version "pretty-format@^27.0.2"
warning Resolution field "pretty-format@29.7.0" is incompatible with requested version "pretty-format@29.4.3"
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "pretty-format@29.7.0"
info Reasons this module exists
- "_project_#@types#jest" depends on it
- Hoisted from "_project_#@types#jest#pretty-format"
- Hoisted from "_project_#jest-matcher-utils#pretty-format"
- Hoisted from "_project_#lerna#@lerna#legacy-package-management#pretty-format"
- Hoisted from "_project_#@testing-library#react#@testing-library#dom#pretty-format"
- Hoisted from "_project_#jest-axe#jest-matcher-utils#pretty-format"
- Hoisted from "_project_#jest#@jest#core#pretty-format"
- Hoisted from "_project_#jest-matcher-utils#jest-diff#pretty-format"
- Hoisted from "_project_#@jacuzzi#vacancy#vitest#@vitest#snapshot#pretty-format"
- Hoisted from "_project_#@jacuzzi#vacancy#vitest#@vitest#utils#pretty-format"
- Hoisted from "_project_#jest#@jest#core#jest-config#pretty-format"
- Hoisted from "_project_#jest#@jest#core#jest-message-util#pretty-format"
- Hoisted from "_project_#jest#@jest#core#jest-snapshot#pretty-format"
- Hoisted from "_project_#jest#@jest#core#jest-validate#pretty-format"
- Hoisted from "_project_#jest#@jest#core#jest-config#jest-circus#pretty-format"
- Hoisted from "_project_#jest#@jest#core#jest-runner#jest-leak-detector#pretty-format"
- Hoisted from "_project_#jest#@jest#core#jest-config#jest-circus#jest-each#pretty-format"
info Disk size without dependencies: "188KB"
info Disk size with unique dependencies: "296KB"
info Disk size with transitive dependencies: "916KB"
info Number of shared dependencies: 5
✨ Done in 0.38s.
yarn workspace @scope/package vitest --browser.enabled --browser.name chrome
// package/vitest.config.ts
import { defineConfig } from 'vitest/config';
// eslint-disable-next-line import/no-default-export
export default defineConfig({
test: {
include: ['test/specs/path/some-spec.spec.{ts,tsx}'],
},
});
@beamery-tomht what about v1.0.0-beta.6?
Yes, just checked and still happening. I've reverted back to 0.34.6
as the bug with tests hanging sometimes is less of a blocker than the tests not working at all 😿
Describe the bug
When running the beta-5 release of vitest in browser mode, you can get stuck in an infinite loop if you have an older version of
pretty-format
installed as sibling ofvitest
. See animated gif:Reproduction
Or download this zip: vitest-infinite-reload.zip
System Info
Used Package Manager
npm
Validations