@uplinq/mcp-vitest
Version:
MCP server for Vitest with watch-mode support for fast test feedback
67 lines • 1.96 kB
TypeScript
import type { TestStatus, FailingTest } from './types/test-results.js';
/**
* Manages the Vitest instance lifecycle and test execution
*/
export declare class VitestManager {
private vitest;
private testStateTracker;
private isInitialized;
private isShuttingDown;
private statePollingInterval;
private hasInitialRunCompleted;
private isStdioTransport;
constructor(isStdioTransport?: boolean);
/**
* Initializes the Vitest instance with watch mode enabled
*/
initialize(): Promise<void>;
/**
* Starts polling Vitest state to detect when tests complete
*/
private startStatePolling;
/**
* Checks the current Vitest state and updates our tracker accordingly
*/
private checkVitestState;
/**
* Sets up event listeners for Vitest state changes
*/
private setupEventListeners;
/**
* Gets the current test state from the tracker
*/
getTestState(): TestStatus;
/**
* Gets all currently failing tests
*/
getFailingTests(): FailingTest[];
/**
* Checks if Vitest is initialized and ready
*/
isReady(): boolean;
/**
* Gets the current initialization status
*/
getStatus(): 'uninitialized' | 'initializing' | 'ready' | 'error' | 'shutting-down';
/**
* Resets the test state tracker
*/
resetTestState(): void;
/**
* Closes the Vitest instance and cleans up resources
*/
close(): Promise<void>;
/**
* Gets statistics about the managed Vitest instance
*/
getStatistics(): {
isInitialized: boolean;
isReady: boolean;
status: "error" | "uninitialized" | "initializing" | "ready" | "shutting-down";
fileCount: number;
discoveryStatus: import("./types/test-results.js").DiscoveryStatus;
hasInitialRunCompleted: boolean;
isPolling: boolean;
};
}
//# sourceMappingURL=vitest-manager.d.ts.map