Skip to content

Commit 65a8f15

Browse files
mizdraclaude
andauthored
test(ts-plugin): split find-all-references and rename-symbol e2e tests into per-behavior cases (#379)
* test(ts-plugin): split find-all-references and rename-symbol e2e tests into per-behavior cases Continue the e2e test refactor started in #378. Each test now owns a minimal fixture and asserts a single behavior, organized by the .d.ts/mapping pattern under test. Also revisit go-to-definition.test.ts so all three feature test files share the same describe structure. This is the second PR of a multi-PR series (see #378 for the first PR). Shared describe structure (group 1 differs by feature, groups 2-5 are common): - Group 1: feature-specific Volar.js auto-mapping - go-to-definition: jumps to the top of a CSS module file (5 tests) - find-all-references: finds all references to the styles binding (1 test) - rename-symbol: (none — module specifier rename is sendGetEditsForFileRename territory and styles binding rename is core TS behavior, not ts-plugin's) - Group 2: <feature> a local token (TS-side trigger, 3 tests) - Group 3: transitively resolves a re-export to its source declaration (3 tests) - Group 4: <feature> from a CSS-side class declaration (1 test, newly added) - Group 5: <feature> from a CSS-side @value ... from binding (3 tests) Per-file totals: - go-to-definition: 15 tests x 2 namedExports variants = 30 - find-all-references: 11 tests x 2 namedExports variants = 22 (was 17 cases sharing one fixture inside a single test.each) - rename-symbol: 10 tests x 2 namedExports variants = 20 (was 13 cases inside a single test.each, only namedExports: false) rename-symbol now also covers namedExports: true via describe.each. * refactor(ts-plugin): move test/builder.ts under src/test/ to match other packages * test(ts-plugin): rename multi-declaration test to a scenario qualifier Other test names in the same describe blocks describe a trigger position or fixture shape (e.g. "from styles.<token> access"), but this one was phrased as a result ("returns all declarations ..."). Drop the verb so the name reads as a scenario qualifier on the parent describe and stays consistent across all three feature files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a24fc8b commit 65a8f15

4 files changed

Lines changed: 585 additions & 696 deletions

File tree

0 commit comments

Comments
 (0)