Skip to content

Conversation

@yamadashy
Copy link
Owner

Summary

Add extensive test coverage to verify that ellipsis (...) characters are correctly preserved throughout all processing stages.

This PR addresses concerns raised in #946 by adding comprehensive tests that confirm ellipsis characters are never converted to single dots in any scenario.

Test Coverage

New Test Files

  • tests/core/output/ellipsisPreservation.test.ts (18 tests)
    • Output generation with various formats and options
  • tests/core/file/fileProcessContent.test.ts (9 new tests added)
    • File content processing with various options

Test Scenarios

  • ✅ All output formats: XML (Handlebars/XMLBuilder), JSON, Markdown, Plain
  • ✅ Multiple languages: TypeScript, JavaScript, Go, Python
  • ✅ Spread operators: Array spread, Object spread, Rest parameters
  • ✅ Processing options: compress, removeComments, removeEmptyLines, showLineNumbers
  • ✅ Edge cases: Multiple ellipsis, strings, template literals, standalone ellipsis

Test Results

✓ Test Files: 2 passed
✓ Tests: 35 passed (35)

Investigation Summary

After thorough investigation of the codebase, we found no code that converts ... to . in any processing stage:

  • ✅ XMLBuilder (fast-xml-parser) preserves ...
  • ✅ Handlebars templates preserve ...
  • ✅ Tree-sitter parsing preserves ...
  • ✅ File manipulation (comment removal, etc.) preserves ...
  • ✅ All output generation preserves ...

Related Issue

Related to #946

Checklist

  • Run npm run test
  • Run npm run lint

Add extensive test coverage to verify that ellipsis (...) characters are
correctly preserved throughout all processing stages, addressing concerns
raised in issue #946.

This commit adds:
- 18 test cases in ellipsisPreservation.test.ts covering output generation
- 9 test cases in fileProcessContent.test.ts covering content processing

Test coverage includes:
- All output formats (XML/Handlebars, XML/XMLBuilder, JSON, Markdown, Plain)
- Multiple programming languages (TypeScript, JavaScript, Go, Python)
- Various spread operator patterns (array spread, object spread, rest parameters)
- All processing options (compress, removeComments, removeEmptyLines, showLineNumbers)
- Edge cases (multiple ellipsis, strings, template literals, standalone ellipsis)

All 35 tests pass, confirming that ellipsis characters are never converted
to single dots in any scenario.

Related to #946
@coderabbitai

This comment has been minimized.

@cloudflare-workers-and-pages

This comment has been minimized.

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.71%. Comparing base (a63546b) to head (aba6f1b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #963      +/-   ##
==========================================
+ Coverage   89.68%   89.71%   +0.02%     
==========================================
  Files         111      111              
  Lines        7843     7843              
  Branches     1504     1505       +1     
==========================================
+ Hits         7034     7036       +2     
+ Misses        809      807       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants