You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: run gutter tests with the most specific config when several configs claim the same file
When a shared base config (e.g. vitest.config.base.ts) matches the
extension's configGlob, it gets its own Vitest instance that claims the
same test files as the package-level configs merging it. The editor
gutter "Run Test" button then executed tests with the base config,
which lacks the merged test options (tags, env, ...), failing with
errors like 'The Vitest config does't define any "tags"'.
Two changes:
1. testTree: file items now accumulate the tags of every config that
claims them (folder items already did this). Previously a file item
only carried the tag of the first config that resolved it, so that
config's profile was the only one VS Code could ever pick.
2. extension: run/debug/coverage profiles are registered for all
discovered configs upfront - deepest config first - before any
Vitest process spawns. When several profiles can run the same test
item, VS Code invokes the first-registered one, so the most specific
config becomes the effective default. Config resolution order is
unchanged; profiles for configs that never resolve (claimed by a
workspace config, disabled, or failed) are disposed after resolution.
Verified with a new e2e regression test: a gutter run on a test file
claimed by both a root base config and a package-level config must
execute under the package-level config.
Fixes#799
0 commit comments