test(ts-plugin): split completion and code-fix e2e tests into per-behavior cases#380
Conversation
… test The fixture only contains `styles;` and never renders any JSX, so the `jsx` and `types` compilerOptions are not needed for that test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ports is false Add the negative-side cases for the `namedExports: true && !prioritizeNamedImports` branches so that both the positive (current `prioritizeNamedImports: true`) and negative behaviors of the suppression logic are pinned: - completion: named tokens are filtered out of suggestions - code-fix: named import code fixes are excluded Reorganize the existing `prioritizeNamedImports (namedExports: true)` describe into two parallel `prioritizeNamedImports: false / true` blocks under a single parent so the on/off pair is visually adjacent. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`prioritizeNamedImports: false` already conveys the configured value; the `(default)` annotation is redundant and risks going stale if the default changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
There was a problem hiding this comment.
Pull request overview
Refactors the ts-plugin e2e tests for completion and code-fix into smaller, behavior-focused cases with per-test minimal fixtures, aligning with the ongoing series started in #378/#379.
Changes:
- Rewrites
completion.test.tsinto multiple targeted tests grouped bynamedExportsandprioritizeNamedImports. - Rewrites
code-fix.test.tsinto multiple targeted tests grouped bynamedExportsandprioritizeNamedImports. - Adds negative-branch coverage for the
namedExports: true && !prioritizeNamedImportsbehavior in both completion and code-fix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/ts-plugin/e2e-test/feature/completion.test.ts | Splits completion e2e coverage into smaller fixtures/tests organized by configuration and behavior. |
| packages/ts-plugin/e2e-test/feature/code-fix.test.ts | Splits code-fix e2e coverage into smaller fixtures/tests organized by configuration and behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…issingCSSRule Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…xMissingCSSRule Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Refactor
packages/ts-plugin/e2e-test/feature/completion.test.tsandpackages/ts-plugin/e2e-test/feature/code-fix.test.tsso that eachtestblock owns a minimal fixture and asserts a single behavior, organized by the .d.ts/mapping pattern under test.This is the 3rd PR of a multi-PR series (see #378 for the first PR / overall context, #379 for the previous PR).
What's new
packages/ts-plugin/e2e-test/feature/completion.test.ts: rewritten as 11 behavior-focused tests organized into 3 describe blocks, each with its own minimal fixture.packages/ts-plugin/e2e-test/feature/code-fix.test.ts: rewritten as 11 behavior-focused tests organized into 3 describe blocks, each with its own minimal fixture.namedExports: true && !prioritizeNamedImportsbranches:prioritizeNamedImportscases (on/off) are now siblings under a single parent describe so the pair is visually adjacent.Test structure
completion.test.ts:code-fix.test.ts:Total: 11 tests (completion) + 11 tests (code-fix) = 22 tests.
Test plan
vp test --project e2e packages/ts-plugin/e2e-test/feature/completion.test.ts packages/ts-plugin/e2e-test/feature/code-fix.test.ts— 22 passedvp test --project e2e(full e2e suite) — no regressionsvp check(format + lint + type) — pass🤖 Generated with Claude Code