Skip to content

Commit db2f15c

Browse files
committed
Add comprehensive unit tests for code generator
Added extensive test coverage for the code generator including: Test Cases: - Simple component with string parameter - Component with single channel parameter - Component with multiple channels - Component with mixed parameters (channels + regular) - Component with complex HTML structure - Component without parameters - Multiple components in one file - Complex widget with 5 parameters (2 channels, 3 regular) Verification Coverage: - Props struct generation - Option function generation (With* functions) - Component struct with channel fields - Current value fields (current*) for channels - BindApp method generation - Channel listener goroutine methods - Proper "for val := range" syntax - Update() calls in listeners - Multiple channel listeners per component - Render method with runtime.* calls - Interface method generation (Mount, Unmount, Update) - Import generation - Code generation comment header These tests ensure channel-based reactive state management is correctly generated for all component configurations.
1 parent e8c901a commit db2f15c

1 file changed

Lines changed: 535 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)