|
50 | 50 |
|
51 | 51 | ### P1: Parser Efficiency |
52 | 52 |
|
53 | | -- [ ] **Avoid double-parsing** - `parser.ts` and `extractor.ts` both parse similar constructs. Consolidate into a single AST-based approach. |
| 53 | +- [x] **Avoid double-parsing** - ✅ Already resolved. `parser.ts` is deprecated (only re-exports for backward compatibility). All parsing now uses TypeScript AST via `extractor/cache.ts` with `createSourceFile`. |
54 | 54 |
|
55 | 55 | - [x] **Lazy comment extraction** - `extractJSDocComments()` is called even when `keepComments=false`. Short-circuit early. ✅ Already implemented |
56 | 56 |
|
|
261 | 261 |
|
262 | 262 | - [x] **Add missing test for example 0012** - Test file exists but not in test array. ✅ Already included |
263 | 263 |
|
264 | | -- [ ] **Add `checker.ts` test** - Large file excluded from tests, should have coverage. |
| 264 | +- [x] **Add `checker.ts` test** - ✅ Added `test/checker.test.ts` with 34 tests (Session 8). |
265 | 265 |
|
266 | 266 | - [x] **Property-based testing** - ✅ Added `test/fuzzing.test.ts` with 25 tests: |
267 | 267 | - Random declaration generators (functions, interfaces, types, classes, enums) |
268 | 268 | - Malformed input resilience tests (unclosed braces, invalid syntax) |
269 | 269 | - Stress tests (many declarations, deep nesting) |
270 | 270 | - Performance characteristics tests |
271 | 271 |
|
272 | | -- [ ] **Snapshot testing** - Add snapshot tests for complex type transformations. |
| 272 | +- [x] **Snapshot testing** - ✅ Added `test/snapshots.test.ts` (24 tests): |
| 273 | + - Generic types (complex constraints, recursive, multiple constraints) |
| 274 | + - Conditional types (nested, distributive, infer) |
| 275 | + - Mapped types (modifiers, key remapping) |
| 276 | + - Template literal types |
| 277 | + - Function overloads |
| 278 | + - Class patterns (abstract, decorators, multiple interfaces) |
| 279 | + - Module patterns (namespaces, module augmentation) |
| 280 | + - Utility type patterns (Pick, Partial, Omit, Exclude) |
| 281 | + - Edge cases (deeply nested, large unions, index signatures, const assertions, callable types) |
273 | 282 |
|
274 | | -- [ ] **Error case testing** - Test malformed input handling. |
| 283 | +- [x] **Error case testing** - ✅ Test malformed input handling covered in `test/errors.test.ts` (52 tests). |
275 | 284 |
|
276 | 285 | - [ ] **Performance regression tests** - Add benchmarks to CI. |
277 | 286 |
|
@@ -694,7 +703,7 @@ Based on test fixtures analysis: |
694 | 703 | - Edge cases (Unicode, null bytes, BOM, mixed line endings) |
695 | 704 | - Complex declarations (abstract class, const enum, namespace, module) |
696 | 705 |
|
697 | | -- [ ] **Edge case coverage** - `edge-cases.ts` fixture exists but verify all cases pass. |
| 706 | +- [x] **Edge case coverage** - ✅ Verified. `test/edge-cases.test.ts` (27 tests) + fixture test in `dts.test.ts` all pass. |
698 | 707 |
|
699 | 708 | - [x] **Plugin tests** - No tests for bun-plugin or vite-plugin. ✅ Added `test/plugins.test.ts` with 22 tests |
700 | 709 |
|
@@ -1460,6 +1469,21 @@ Based on test fixtures analysis: |
1460 | 1469 |
|
1461 | 1470 | **Total tests: 520** (up from 481) |
1462 | 1471 |
|
| 1472 | +#### Latest Features (November 27, 2025 - Session 16) |
| 1473 | +
|
| 1474 | +- **Snapshot Testing** - `test/snapshots.test.ts` (NEW, 24 tests): |
| 1475 | + - Complex generic types with constraints and recursion |
| 1476 | + - Conditional types (nested, distributive, infer) |
| 1477 | + - Mapped types with modifiers and key remapping |
| 1478 | + - Template literal types with union expansion |
| 1479 | + - Function overloads |
| 1480 | + - Class patterns (abstract, decorators, multiple interfaces) |
| 1481 | + - Module patterns (namespaces, module augmentation) |
| 1482 | + - Utility type patterns (Pick, Partial, Omit, Exclude) |
| 1483 | + - Edge cases (deeply nested, large unions, index signatures, callable types) |
| 1484 | +
|
| 1485 | +**Total tests: 544** (up from 520) |
| 1486 | +
|
1463 | 1487 | --- |
1464 | 1488 |
|
1465 | 1489 | *Last updated: November 27, 2025* |
|
0 commit comments