单元测试 (Unit Tests)
-
Constructor - should create instance with default options
PASSED
5ms
-
Constructor - should create instance with custom options
PASSED
3ms
-
generateComponent - should generate basic React functional component
PASSED
12ms
-
generateComponent - should generate component without props
PASSED
8ms
-
generateComponent - should generate component with multiple methods
PASSED
10ms
-
generateComponent - should generate basic Vue component
PASSED
11ms
-
generateComponent - should generate basic HTML component
PASSED
8ms
-
validateSyntax - should validate correct React JSX syntax
PASSED
15ms
-
validateSyntax - should detect syntax errors
PASSED
7ms
-
Error Handling - should capture generation errors
PASSED
5ms
-
Template Registration - should register a template
PASSED
4ms
-
Template Rendering - should render template with simple variables
PASSED
8ms
-
Template Rendering - should render template with nested properties
PASSED
9ms
-
Conditional Rendering - should render content when condition is true
PASSED
7ms
-
Loop Rendering - should render loop over array
PASSED
10ms
-
Helper Processing - should execute registered helpers
PASSED
7ms
-
Edge Cases - should handle unicode characters
PASSED
5ms
-
check - should validate correct JavaScript code
PASSED
18ms
-
check - should validate React JSX syntax
PASSED
22ms
-
check - should detect syntax errors in JavaScript
PASSED
12ms
-
check - should validate correct TypeScript code
PASSED
20ms
-
Common Issues - should detect console.log statements
PASSED
16ms
-
Common Issues - should detect debugger statements
PASSED
11ms
-
Constructor - should create instance with antd as default
PASSED
2ms
-
Ant Design Components - should have Button component
PASSED
3ms
-
generateImport - should generate import statement for component
PASSED
3ms
-
generateComponentJSX - should generate JSX for component with props
PASSED
3ms
-
validateProps - should validate correct props
PASSED
3ms
集成测试 (Integration Tests)
-
Complete Component Generation Workflow - should generate, validate, and format a complete component
PASSED
45ms
-
Complete Component Generation Workflow - should integrate component library with code generation
PASSED
38ms
-
Template-Based Code Generation - should use templates for repeated component patterns
PASSED
32ms
-
Multi-Component Generation - should generate multiple related components
PASSED
67ms
-
Code Quality Checks - should enforce code quality standards
PASSED
35ms
-
Framework-Specific Integration - should support React/Vue/HTML framework flow
PASSED
85ms
-
Performance Integration Tests - should generate and validate components within time limits
PASSED
89ms
端到端测试 (E2E Tests)
-
Scenario 1: Basic Component Generation (4 assertions)
PASSED
✓
-
Scenario 2: Complex Component with State and Methods (5 assertions)
PASSED
✓
-
Scenario 3: Component Library Integration (12 assertions)
PASSED
✓
-
Scenario 4: Template Rendering (11 assertions)
PASSED
✓
-
Scenario 5: Syntax Validation (9 assertions)
PASSED
✓
-
Scenario 6: Multi-Framework Support (12 assertions)
PASSED
✓
-
Scenario 7: Error Handling (5 assertions)
PASSED
✓
-
Scenario 8: Performance Test - 50 components in 425ms (8.5ms avg)
PASSED
✓