Skip to content

Title: Inline test runs conflict with Bun extension and break workspace setup #681

@polRk

Description

@polRk

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

  1. Install both the Vitest VS Code extension and the Bun VS Code extension.
  2. Configure a Vitest workspace (vitest.workspace.ts) that registers inject inside a shared setup.
  3. Open any integration/e2e test from a package in VS Code.
  4. Click the inline run icon next to the test.

Output

TypeError: inject is not a function

Extension Version

1.32.1

Vitest Version

4.0.7

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions