Skip to content

test(extract): cover TypeScript generic tuple with string-literal type arguments#730

Open
Arvuno wants to merge 1 commit into
colbymchenry:mainfrom
Arvuno:test/typescript-generic-tuple-literal-arg
Open

test(extract): cover TypeScript generic tuple with string-literal type arguments#730
Arvuno wants to merge 1 commit into
colbymchenry:mainfrom
Arvuno:test/typescript-generic-tuple-literal-arg

Conversation

@Arvuno

@Arvuno Arvuno commented Jun 8, 2026

Copy link
Copy Markdown

Adds regression coverage for the dynamic-dispatch contract pattern from #634. When a TypeScript file declares a generic tuple whose element types carry string-literal type arguments (e.g. Service<'name', ...>), the literal names are not currently indexed by the extractor.

Summary

  • Adds one .skip-marked test in __tests__/extraction.test.ts inside the existing TypeScript Extraction describe block.
  • Pins the failure mode: the literal names ('query_apply_record', 'apply_confirm') are not in the extracted node list, and the containing tuple type alias MyServiceList is also not indexed.
  • Test is .skip so the suite stays green. The next fix in src/extraction/languages/typescript.ts can be verified by removing the .skip.

Testing

  • npx vitest run (full suite) — 64 files passed, 1261 tests passed, 3 skipped (1 newly skipped, 2 pre-existing). No regressions.
  • npx vitest run __tests__/extraction.test.ts -t "generic tuple literal" — 1 skipped (expected).
  • Verification against extractFromSource with the new fixture: confirmed that neither 'query_apply_record' nor 'apply_confirm' appear in the node list, which is the behavior the test pins.

Refs #634.

…e arguments

Adds a regression test for the dynamic-dispatch contract pattern from
issue colbymchenry#634: when a TypeScript file declares a generic tuple whose
element types carry string-literal type arguments (e.g. Service<'name', ...>),
the literal names are not currently indexed by the extractor.

The test is marked .skip so the suite stays green; the future fix in
src/extraction/languages/typescript.ts can be verified by removing
the .skip. Inline comment documents the skip and the enable steps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant