Commit 6900b82
committed
test: add comprehensive integration tests for ImportManager (Phase 9.5)
- Created 20 integration tests covering all import organization features
- Fixed critical bug: usage detection was skipping identifiers in variable initializers
- Fixed sorting disabled mode: groups were still sorting internally
- All 21 tests passing (20 ImportManager + 1 sample test)
Test coverage includes:
- Remove unused imports and specifiers
- Keep excluded libraries (ignoredFromRemoval)
- Type-only imports
- Local shadowing
- Aliased imports
- Namespace imports
- Default imports
- Mixed default + named imports
- Import grouping (Plains -> Modules -> Workspace)
- Alphabetical sorting
- Quote style configuration
- Semicolons configuration
- Space in braces configuration
- Blank lines between groups
- Trailing /index removal
- Disable removal option
- Disable sorting option
- String-only imports
Added GitHub Actions workflow to test on Linux/macOS/Windows with xvfb support1 parent 0a4e012 commit 6900b82
6 files changed
Lines changed: 659 additions & 15 deletions
File tree
- .claude
- .github/workflows
- mini-typescript-hero
- dist
- src
- imports
- test/imports
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240696 | 240696 | | |
240697 | 240697 | | |
240698 | 240698 | | |
240699 | | - | |
| 240699 | + | |
| 240700 | + | |
| 240701 | + | |
| 240702 | + | |
| 240703 | + | |
| 240704 | + | |
| 240705 | + | |
| 240706 | + | |
| 240707 | + | |
| 240708 | + | |
| 240709 | + | |
| 240710 | + | |
| 240711 | + | |
| 240712 | + | |
| 240713 | + | |
| 240714 | + | |
240700 | 240715 | | |
240701 | 240716 | | |
240702 | 240717 | | |
| |||
240800 | 240815 | | |
240801 | 240816 | | |
240802 | 240817 | | |
| 240818 | + | |
240803 | 240819 | | |
240804 | 240820 | | |
240805 | 240821 | | |
240806 | 240822 | | |
240807 | | - | |
| 240823 | + | |
| 240824 | + | |
240808 | 240825 | | |
240809 | 240826 | | |
240810 | 240827 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
186 | 193 | | |
187 | 194 | | |
188 | 195 | | |
| |||
333 | 340 | | |
334 | 341 | | |
335 | 342 | | |
| 343 | + | |
336 | 344 | | |
337 | 345 | | |
338 | 346 | | |
339 | 347 | | |
340 | 348 | | |
341 | 349 | | |
342 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
343 | 353 | | |
344 | 354 | | |
345 | 355 | | |
| |||
0 commit comments