UNPKG

@uplinq/mcp-vitest

Version:

MCP server for Vitest with watch-mode support for fast test feedback

83 lines 2.11 kB
import type { File as VitestFile, TaskResultPack } from 'vitest'; import type { TestStatus, FailingTest, DiscoveryStatus } from './types/test-results.js'; /** * Manages and tracks the state of Vitest test execution */ export declare class TestStateTracker { private discoveryStatus; private testFiles; private lastUpdate; /** * Updates test state from Vitest task packs */ updateFromTaskPacks(packs: TaskResultPack[]): void; /** * Processes a single task from Vitest */ private processTask; /** * Marks test discovery as complete */ markDiscoveryComplete(): void; /** * Marks test discovery as failed */ markDiscoveryError(): void; /** * Processes collected files from Vitest */ processCollectedFiles(files: VitestFile[]): void; /** * Gets the aggregated test state */ getAggregatedState(): TestStatus; /** * Gets all currently failing tests with detailed error information */ getFailingTests(): FailingTest[]; /** * Calculates summary statistics for all tests */ private calculateSummary; /** * Builds the nested file structure with test results */ private buildFileStructure; /** * Builds a node for a test file */ private buildFileNode; /** * Builds a node for a task (test or suite) */ private buildTaskNode; /** * Gets statistics for a test file */ private getFileStats; /** * Gets statistics for a task (recursive) */ private getTaskStats; /** * Collects failing tests recursively from a task */ private collectFailingTests; /** * Gets the suite path for a test (breadcrumb trail) */ private getSuitePath; /** * Resets the tracker state */ reset(): void; /** * Gets the current discovery status */ getDiscoveryStatus(): DiscoveryStatus; /** * Gets the number of test files being tracked */ getFileCount(): number; } //# sourceMappingURL=test-state-tracker.d.ts.map