test(extract): cover TypeScript generic tuple with string-literal type arguments#730
Open
Arvuno wants to merge 1 commit into
Open
test(extract): cover TypeScript generic tuple with string-literal type arguments#730Arvuno wants to merge 1 commit into
Arvuno wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
.skip-marked test in__tests__/extraction.test.tsinside the existingTypeScript Extractiondescribe block.'query_apply_record','apply_confirm') are not in the extracted node list, and the containing tuple type aliasMyServiceListis also not indexed..skipso the suite stays green. The next fix insrc/extraction/languages/typescript.tscan 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).extractFromSourcewith 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.