#11277·vitest

Pass configOptions to environment setup

Author: yamachi4416Created Sep 15, 2026Updated Sep 17, 2026
Labelsenhancement: pending triage

Clear and concise description of the problem

When @vitest-environment-options is specified in a test file, those options are passed to the custom environment's setup method.

With access to the environmentOptions defined in the config, custom environments would be able to override specific options on a per-test basis, which would make @vitest-environment-options more flexible.

Thank you for the guidance in the pull request

Suggested solution

How about passing configOptions as an additional parameter to setup and setupVM ?

Alternative

No response

Additional context

No response

Validations