Skip to content

Remove redundant top-level describe wrappers from @typespec/compiler tests#11208

Open
timotheeguerin wants to merge 4 commits into
mainfrom
tim/cleanup-compiler-test-describe
Open

Remove redundant top-level describe wrappers from @typespec/compiler tests#11208
timotheeguerin wants to merge 4 commits into
mainfrom
tim/cleanup-compiler-test-describe

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Follow-up to #11205, applying the same cleanup to the @typespec/compiler package.

Per CONTRIBUTING.md, a single describe(...) wrapping an entire test file is redundant (the file name already provides context). This PR removes those top-level wrappers and dedents the contents, using it() directly at the top level. Nested/sub-group describe() calls are left intact.

Scope

  • 72 compiler test files unwrapped (single top-level describe, no top-level it/test).
  • Excluded files still using the legacy test host and files with legitimate sub-group describes.
  • Excluded 3 templates/ files (tsp init scaffolding, not compiler tests).

Notes

  • Position-sensitive server tests (folding, hover, document-highlight, rename) required a template-literal-aware dedent so that multi-line source strings keep their exact indentation (and hardcoded line/column assertions stay valid).
  • 7 files have minor prettier reflows (lines collapsing after dedent); no logic changes.

Validation

  • All 4005 compiler tests pass.
  • prettier and oxlint clean.

@pkg-pr-new

pkg-pr-new Bot commented Jul 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/compiler@11208

commit: 1fc7674

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the compiler:core Issues for @typespec/compiler label Jul 8, 2026
@azure-sdk-automation

azure-sdk-automation Bot commented Jul 8, 2026

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@timotheeguerin timotheeguerin marked this pull request as ready for review July 8, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant