Description
Current test coverage is 38.5%. New functions added in the error formatting feature could use additional test coverage.
Functions Needing More Tests
sanitizeTerraformANSI() - edge cases with various ANSI sequences
theme() - caching behavior verification
renderDiagnosticDetailLine() - various marker patterns and modes
createGuideReplacer() - replacement accuracy
Suggested Test Cases
sanitizeTerraformANSI
- Nested ANSI codes
- Malformed ANSI sequences
- Mixed color and formatting codes
- Empty strings
Theme Caching
- Verify cache is used on repeated calls
- Verify cache invalidation after
toggleRenderingMode()
renderDiagnosticDetailLine
- Dashboard mode with error severity
- Dashboard mode with warning severity
- HighContrast mode with error severity
- HighContrast mode with warning severity
- Lines with underline markers (^, ~)
- Lines with location markers (on file.tf line X)
Underline Pattern
- Various indentation levels
- Mixed ^ and ~ characters
- Edge cases (empty, whitespace only)
Created from code review of fix_errors_format_default branch
Description
Current test coverage is 38.5%. New functions added in the error formatting feature could use additional test coverage.
Functions Needing More Tests
sanitizeTerraformANSI()- edge cases with various ANSI sequencestheme()- caching behavior verificationrenderDiagnosticDetailLine()- various marker patterns and modescreateGuideReplacer()- replacement accuracySuggested Test Cases
sanitizeTerraformANSI
Theme Caching
toggleRenderingMode()renderDiagnosticDetailLine
Underline Pattern
Created from code review of
fix_errors_format_defaultbranch