-
-
Notifications
You must be signed in to change notification settings - Fork 107
Description
Describe the bug
Overview
In a monorepo that uses Vitest Workspaces, our integration and e2e tests rely on inject, which is registered inside the shared workspace setup. When both the Vitest extension and the Bun extension are enabled, the inline run icon next to a test is handled by the Bun extension instead of the Vitest extension. The test is then executed with Bun from the package root, the workspace setup is skipped, and the test fails with TypeError: inject is not a function. If I disable the Bun extension, inline runs respect the workspace config and everything passes.
Environment
- VSCode Version: 1.99.3
- Vitest VS Code extension: 1.32.1
- Bun VS Code extension: 0.0.31
- Bun: 1.3.0
- Node: 24.7.0
- Vitest: 4.0.7
Actual Behavior
The Bun extension intercepts the inline run, launches the test with Bun from the package root, and the shared setup never runs, resulting in:
Additional information
The issue can be reproduced on ydb-platform/ydb-js-sdk (public repo).
Reproduction
- Install both the Vitest VS Code extension and the Bun VS Code extension.
- Configure a Vitest workspace (
vitest.workspace.ts) that registersinjectinside a shared setup. - Open any integration/e2e test from a package in VS Code.
- Click the inline run icon next to the test.
Output
TypeError: inject is not a functionExtension Version
1.32.1
Vitest Version
4.0.7
Validations
- Check that you are using the latest version of the extension
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.