Skip to content

Restore fourslash marker selection and native JS test discovery - #65476

Open
Jake Bailey (jakebailey) wants to merge 1 commit into
microsoft:mainfrom
jakebailey:compiler-fixes/fourslash-discovery
Open

Jake Bailey (jakebailey) wants to merge 1 commit into
microsoft:mainfrom
jakebailey:compiler-fixes/fourslash-discovery

Conversation

@jakebailey

Copy link
Copy Markdown
Member

Two things:

  • Marker iteration was testing the wrong thing. Fix that.
  • Our _js_test.go naming broke because Go treats js as GOOS. Oops.

Marker iteration tested its freshly allocated result instead of the
requested names. Subsets were ignored and missing names went unchecked.
Give the import-path rename test real markers and recognize resource
operations in rename assertions now that those callbacks actually run.

Go treats a trailing _js_test.go as a platform constraint. Rename the
thirteen affected tests without changing their identities, and record
the newly exercised reference baselines. Rewrite the CommonJS fixture
using supported class expandos rather than mixed export assignments,
keeping its module-reference assertion and error checks intact.
Copilot AI balanced review requested due to automatic review settings November 13, 2026 04:54
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Nov 13, 2026
@typescript-automation typescript-automation Bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the marker-selection and Go test-discovery changes.

No open issues 🎉

What changed in this PR

Restores reliable marker selection and native Go test discovery in the fourslash suite used to test TypeScript language-server features.

Changes:

  • Fixes marker iteration to honor requested markers, with regression tests for ordering, duplicates, empty selections, and missing markers.
  • Uses _jsFile_test.go filenames to avoid Go’s js platform filtering, and adds reference baselines for restored tests.
  • Updates rename assertions to recognize both workspace-edit formats and adds explicit markers to import-path rename tests.
File Description
tsc/​testdata/​baselines/​reference/​fourslash/​findAllReferences/​findAllRefsJsDocTypeDef_js.baseline.jsonc Records JSDoc typedef reference results.
tsc/​testdata/​baselines/​reference/​fourslash/​findAllReferences/​findAllRefsJsDocTemplateTag_function_js.baseline.jsonc Records function template-tag reference results.
tsc/​testdata/​baselines/​reference/​fourslash/​findAllReferences/​findAllRefsJsDocTemplateTag_class_js.baseline.jsonc Records class template-tag reference results.
tsc/​testdata/​baselines/​reference/​fourslash/​findAllReferences/​findAllRefs_importType_js.baseline.jsonc Records JavaScript import-type reference results.
tsc/​internal/​fourslash/​tests/​importStatementCompletions_jsFile_test.go Restores native discovery of import-statement completion coverage.
tsc/​internal/​fourslash/​tests/​importNameCodeFix_all_jsFile_test.go Restores native discovery of JavaScript import fix-all coverage.
tsc/​internal/​fourslash/​tests/​importCompletionsPackageJsonImportsPattern_ts_jsFile_test.go Restores discovery of .ts import-pattern completion coverage.
tsc/​internal/​fourslash/​tests/​importCompletionsPackageJsonImportsPattern_jsFile_test.go Restores discovery of wildcard package-import completion coverage.
tsc/​internal/​fourslash/​tests/​importCompletionsPackageJsonImports_jsFile_test.go Restores discovery of named package-import completion coverage.
tsc/​internal/​fourslash/​tests/​importAllowRenameOfImportPath_test.go Adds named markers to import-path rename cases.
tsc/​internal/​fourslash/​tests/​findAllRefsJsDocTypeDef_jsFile_test.go Restores discovery of JSDoc typedef reference coverage.
tsc/​internal/​fourslash/​tests/​findAllRefsJsDocTemplateTag_function_jsFile_test.go Restores discovery of function template-tag reference coverage.
tsc/​internal/​fourslash/​tests/​findAllRefsJsDocTemplateTag_class_jsFile_test.go Restores discovery of class template-tag reference coverage.
tsc/​internal/​fourslash/​tests/​findAllRefs_importType_jsFile_test.go Restores discovery and revises the CommonJS import-type fixture.
tsc/​internal/​fourslash/​tests/​docCommentTemplateFunctionWithParameters_jsFile_test.go Restores discovery of JavaScript documentation-completion coverage.
tsc/​internal/​fourslash/​tests/​autoImportPackageJsonImportsPattern_ts_jsFile_test.go Restores discovery of .ts import-pattern auto-import coverage.
tsc/​internal/​fourslash/​tests/​autoImportPackageJsonImportsPattern_jsFile_test.go Restores discovery of wildcard package auto-import coverage.
tsc/​internal/​fourslash/​tests/​autoImportPackageJsonImports_jsFile_test.go Restores discovery of named package auto-import coverage.
tsc/​internal/​fourslash/​fourslash.go Fixes marker selection and supports both rename edit formats.
tsc/​internal/​fourslash/​fourslash_test.go Adds focused marker-selection and missing-marker regression tests.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

2 participants