Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.29.2 "No test suite found in file" thrown in setup files when using experimentalOptimizer: true #2939

Closed
6 tasks done
EvHaus opened this issue Mar 1, 2023 · 1 comment · Fixed by #2974
Closed
6 tasks done

Comments

@EvHaus
Copy link
Contributor

EvHaus commented Mar 1, 2023

Describe the bug

I noticed that with experimentalOptimizer: true my setup file is throwing:

 FAIL  setupFile.ts [ setupFile.ts ]
Error: No test suite found in file /home/myproject/setupFile.ts

This is unexpected because the setup file doens't have any test suites.

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-7pfeua?file=setupFile.ts

To reproduce you'll need vitest configuration to have:

test: {
	deps: {
		experimentalOptimizer: {
			enabled: true,
		},
	},
	setupFiles: ['setupFile.ts'],
}

System Info

System:
    OS: Linux 5.10 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
    Memory: 26.87 GB / 31.32 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.13.0/bin/yarn
    npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
  npmPackages:
    @vitest/coverage-c8: 0.29.2 => 0.29.2
    vite: 3.2.5 => 3.2.5
    vitest: 0.29.2 => 0.29.2

Used Package Manager

pnpm

Validations

@EvHaus
Copy link
Contributor Author

EvHaus commented Mar 16, 2023

Thanks for the fix. Just confirming that 0.29.3 resolved this problem.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants