mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-11 03:38:07 +00:00
Resolves PR #1693 review B5: the captures.ts ancestor-walk rewrite (findSelfOrAncestorOfType[s] + pickFirstNode replacing the prior findNodeAtRange-from-root path) was semantically equivalent to its predecessor per Lane 4 of the production-readiness review, but the existing typescript-captures.test.ts didn't pin the specific sharp edges where an over-aggressive walk would silently break captures. This file does. Each test exercises a capture class whose anchor type is one the rewrite explicitly handles: - member call obj.foo() -> @reference.call.member (call_expression anchor walks to self) - dynamic import import("./helper") -> raw @import.dynamic gets decomposed by splitImportStatement into @import.statement with @import.kind=dynamic + @import.source stripped of quotes - JSX <Foo /> in .tsx -> @reference.call.free emitted (TSX query pattern, query.ts:899-905) but @declaration.parameter-count is NOT synthesized because findSelfOrAncestorOfType('call_expression') returns null on a jsx_self_closing_element anchor. Pre-rewrite the range lookup also returned null. Pinning this contract catches accidental "walk JSX -> outer call" refactors. - constructor `new Foo(1,2)` -> @reference.call.constructor (new_expression anchor walks to self) - named/namespace import + re-export -> @import.statement (one each) - class method override -> @declaration.method per class, no collapse - member read obj.foo (no call) -> @reference.read.member All assertions use exact .toBe(N) per DoD §2.7. |
||
|---|---|---|
| .. | ||
| c | ||
| cpp | ||
| csharp | ||
| go | ||
| python | ||
| typescript | ||
| def-index.test.ts | ||
| emit-references.test.ts | ||
| finalize-algorithm.test.ts | ||
| finalize-orchestrator.test.ts | ||
| import-target-adapter.test.ts | ||
| imported-return-types.test.ts | ||
| method-dispatch-index.test.ts | ||
| module-scope-index.test.ts | ||
| overload-narrowing.test.ts | ||
| parse-worker-scope-integration.test.ts | ||
| pick-implicit-this-overload.test.ts | ||
| position-index.test.ts | ||
| qualified-name-index.test.ts | ||
| reconcile-ownership.test.ts | ||
| registries.test.ts | ||
| resolve-references.test.ts | ||
| resolve-type-ref.test.ts | ||
| resolver-parity-expected-failures.test.ts | ||
| scope-extractor.test.ts | ||
| scope-id.test.ts | ||
| scope-tree.test.ts | ||
| shadow-harness.test.ts | ||
| validate-bindings-immutability.test.ts | ||
| walkers-augmentations.test.ts | ||
| workspace-index.test.ts | ||