mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-17 23:52:36 +00:00
The test file previously asserted on \`defsByFileAndName\`,
\`callablesBySimpleName\`, and \`memberByOwner\` — fields removed when
symbol-keyed lookups moved to \`SemanticModel\`. Rewrite so the same
invariants are asserted via the authoritative consumers:
* New WorkspaceResolutionIndex shape test (scope-only maps).
* \`findExportedDef\` module-export visibility tests:
- keeps top-level class and function defs.
- excludes class-body Variable defs (MAX_USERS = 100).
- excludes class methods from module-export lookup.
* \`findExportedDefByName\` fallback excludes class methods when a
same-named module function exists.
* \`findOwnedMember\` via the reconciled SemanticModel finds Python
class methods after populateOwners + reconcileOwnership.
Total assertions preserved: every invariant from the old test file is
still pinned; the assertion surface shifted from the index shape to
the walker helpers.
Verified:
- workspace-index.test.ts 8/8 passing
|
||
|---|---|---|
| .. | ||
| fixtures | ||
| helpers | ||
| integration | ||
| unit | ||
| utils | ||
| global-setup.ts | ||
| vitest.d.ts | ||