inline test execution from editor gutter
Renders clickable status icons in the editor gutter next to each test case, allowing developers to run individual tests without switching to a terminal or sidebar. Uses VSCode's native TestController API to register test items and bind gutter decorations to test execution commands, with real-time status updates (pass/fail/skip/queued) displayed as colored indicators.
Unique: Integrates directly with VSCode's native TestController API rather than spawning separate test runners, enabling gutter decorations that update in real-time as tests execute and maintaining state synchronization with the Testing sidebar view.
vs alternatives: Faster than terminal-based test execution because it avoids context switching and provides visual feedback directly in the editor, unlike generic test runners that require manual terminal navigation.
hierarchical test discovery and organization
Automatically discovers and parses Vitest test files in the workspace, building a hierarchical tree structure in the Testing sidebar that reflects test suites, describe blocks, and individual test cases. Uses Vitest's native test discovery mechanism (integrated with Vite's file watching) to populate the TestController with test items, enabling folder-level, file-level, and suite-level test execution and filtering.
Unique: Leverages Vitest's native test discovery (which integrates with Vite's module graph) rather than parsing test files independently, ensuring the tree structure always reflects the actual test execution order and configuration without maintaining a separate parser.
vs alternatives: More accurate than regex-based test discovery because it uses Vitest's own AST parsing and execution model, preventing false positives from commented-out tests or test-like patterns in non-test code.
workspace-aware test configuration resolution
Automatically detects and loads Vitest configuration from the workspace, respecting single-folder and multi-folder workspace layouts. The extension resolves vitest.config.ts or vitest.config.js relative to the workspace root and applies configuration settings (test patterns, environment, globals, etc.) to test discovery and execution without requiring manual configuration in VSCode settings.
Unique: Delegates configuration loading to Vitest's native configuration resolver rather than parsing vitest.config.ts independently, ensuring the extension respects Vitest's configuration precedence rules and environment variable handling.
vs alternatives: More maintainable than custom configuration parsing because it uses Vitest's own configuration loader, avoiding duplication and ensuring compatibility with future Vitest configuration changes.
test execution with configurable run modes
Supports multiple test execution modes through toolbar buttons and context menu actions: run all tests, run tests in current file, run single test, run with coverage, and debug mode. The extension maps each mode to a specific Vitest command or configuration and manages the execution lifecycle (startup, progress reporting, result collection) through VSCode's TestController API.
Unique: Implements run modes as distinct TestController commands rather than as configuration options, enabling quick mode switching without restarting the test runner and supporting mode-specific UI (e.g., coverage display only in coverage mode).
vs alternatives: More flexible than single-mode test runners because it supports multiple execution modes (full suite, file, single test, coverage, debug) without requiring separate tools or terminal commands.
watch mode toggle with continuous test execution
Provides a toolbar button to enable/disable Vitest's watch mode, which automatically re-runs affected tests whenever source files or test files change. The extension wraps Vitest's native watch mode implementation, displaying a visual indicator (e.g., 'Watch' button state) in the Testing view toolbar and managing the watch process lifecycle through VSCode's extension API.
Unique: Delegates watch mode implementation entirely to Vitest's native watch mechanism rather than implementing custom file watching, ensuring compatibility with Vitest's smart test selection (only re-running affected tests based on dependency graph analysis).
vs alternatives: More efficient than manual test re-execution because Vitest's watch mode uses dependency graph analysis to run only affected tests, whereas generic test runners typically re-run all tests on any file change.
integrated debugging with vscode debugger
Enables developers to debug individual tests or test suites by launching the VSCode debugger with Vitest as the debug target. The extension registers debug configurations that attach VSCode's native debugger to the Vitest process, allowing breakpoint setting, step-through execution, variable inspection, and conditional breakpoints within test code. Supports standard breakpoint types (line, conditional, logpoint, triggered) through VSCode's native debugging UI.
Unique: Integrates with VSCode's native debugger protocol rather than implementing a custom debugger, enabling full support for VSCode's debugging features (conditional breakpoints, logpoints, watch expressions) without additional implementation overhead.
vs alternatives: More powerful than console.log debugging because it provides interactive breakpoint control and variable inspection, and faster than external debuggers because it runs within VSCode's process without network overhead.
code coverage collection and display
Collects code coverage metrics during test execution using Vitest's built-in coverage provider (typically Istanbul/nyc) and displays coverage data in the editor as line-level indicators and a coverage summary in the Testing view. The extension parses coverage reports generated by Vitest and renders visual feedback (e.g., green/red line numbers) in the editor gutter, with detailed coverage statistics accessible via the Testing sidebar.
Unique: Integrates with Vitest's native coverage provider (v8 or Istanbul) rather than implementing custom coverage collection, ensuring coverage metrics are consistent with Vitest's test execution and respecting Vitest's coverage configuration (include/exclude patterns, thresholds).
vs alternatives: More accurate than external coverage tools because it uses Vitest's own coverage provider and execution context, avoiding discrepancies between test execution and coverage measurement that can occur with separate tools.
inline console output and logging display
Captures console.log, console.error, and other console output from test execution and displays it inline in the editor or in the Testing view's output panel. The extension intercepts Vitest's console output stream and renders it with syntax highlighting and log-level indicators (info, warn, error), allowing developers to see test-related logs without switching to a terminal.
Unique: Captures console output directly from Vitest's execution context rather than parsing terminal output, ensuring accurate log capture and enabling structured formatting (log-level indicators, syntax highlighting) without regex-based parsing.
vs alternatives: More reliable than terminal-based log viewing because it captures output at the source (Vitest process) rather than parsing terminal text, avoiding issues with terminal buffering or output truncation.
+4 more capabilities