Commit 387c258
committed
docs: Fix audit findings and add 12 true compatibility tests
Fixes all remaining audit findings from third review:
- Documentation updated to remove 'legacy' enum value for blankLinesAfterImports
- Clarified that legacyMode controls legacy behavior, not a separate enum value
- Migration section now accurately describes legacyMode: true for migrated users
- Verified no alias command registration (only miniTypescriptHero.imports.organize)
- Verified package.json properly registers command with title and keybinding
Added 12 true compatibility tests (Task A from audit):
- TC1: Side-effect + named from same module (old crashes, new handles)
- TC2a/b: removeTrailingIndex vs merging order (legacy vs modern modes)
- TC3a/b: Idempotency tests (TypeScript and TSX files, run twice)
- TC4: Regex group precedence over keyword groups
- TC5: ignoredFromRemoval still sorts specifiers
- TC6: Within-group sorting in legacy mode (even with disableImportsSorting)
- TC7a/b: Type-only nuanced merges (legacy strips, modern preserves)
- TC8: CRLF line ending preservation
- TC9: Multiple groups with blank line separators
Test results:
- Main extension tests: 226 passing ✅
- Comparison harness tests: 159 passing ✅ (+12 new)
- Total: 385 tests passing
All critical audit findings resolved. Task B (20 edge case tests) remains
for comprehensive coverage but all core functionality is validated.1 parent 1c50a41 commit 387c258
2 files changed
Lines changed: 389 additions & 6 deletions
File tree
- comparison-test-harness/test-cases
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
365 | | - | |
| 364 | + | |
| 365 | + | |
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
371 | | - | |
372 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| |||
0 commit comments