vineguard-mcp-server-standalone
Version:
VineGuard MCP Server v2.1 - Intelligent QA Workflow System with advanced test generation for Jest/RTL, Cypress, and Playwright. Features smart project analysis, progressive testing strategies, and comprehensive quality patterns for React/Vue/Angular proje
98 lines • 2.63 kB
TypeScript
/**
* Component testing tool for VineGuard MCP Server
* Specialized testing for React, Vue, Angular, and other frontend components
*/
export interface ComponentAnalysis {
componentName: string;
framework: 'react' | 'vue' | 'angular' | 'svelte' | 'unknown';
props: Array<{
name: string;
type: string;
required: boolean;
defaultValue?: string;
}>;
hooks: string[];
state: string[];
events: string[];
lifecycle: string[];
dependencies: string[];
complexity: 'low' | 'medium' | 'high';
}
export interface ComponentTestResult {
componentPath: string;
analysis: ComponentAnalysis;
testCode: string;
testType: 'unit' | 'integration' | 'visual' | 'accessibility';
framework: string;
recommendations: string[];
generatedAt: string;
}
export declare class ComponentTester {
/**
* Analyze and generate tests for a component
*/
static testComponent(componentPath: string, options?: {
testType?: 'unit' | 'integration' | 'visual' | 'accessibility';
framework?: string;
includeVisualTests?: boolean;
includeAccessibilityTests?: boolean;
mockDependencies?: boolean;
}): Promise<ComponentTestResult>;
/**
* Analyze component structure and extract metadata
*/
private static analyzeComponent;
/**
* Extract component name from file content or path
*/
private static extractComponentName;
/**
* Detect component framework
*/
private static detectFramework;
/**
* Extract component props/properties
*/
private static extractProps;
/**
* Extract React hooks usage
*/
private static extractHooks;
/**
* Extract state variables
*/
private static extractState;
/**
* Extract event handlers
*/
private static extractEvents;
/**
* Extract lifecycle methods
*/
private static extractLifecycleMethods;
/**
* Extract component dependencies
*/
private static extractDependencies;
/**
* Calculate component complexity
*/
private static calculateComplexity;
/**
* Extract default value for a prop
*/
private static extractDefaultValue;
/**
* Generate comprehensive test code
*/
private static generateComponentTest;
/**
* Generate mock values for different prop types
*/
private static generateMockValue;
/**
* Generate recommendations based on analysis
*/
private static generateRecommendations;
}
//# sourceMappingURL=component-testing.d.ts.map