Repository navigation
Restore fourslash marker selection and native JS test discovery - #65476
Merged
Jake Bailey (jakebailey) merged 2 commits intoNov 14, 2026
Merged
Jake Bailey (jakebailey) merged 2 commits into
Jake Bailey (jakebailey) merged 2 commits into
Conversation
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.
Contributor
There was a problem hiding this comment.
🟢 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.gofilenames to avoid Go’sjsplatform 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
WASI cannot launch the subprocess used to test a missing marker. Keep the direct marker-selection tests without the process-based check.
Jake Bailey (jakebailey)
requested a review
from Andrew Branch (andrewbranch)
November 13, 2026 18:05
Andrew Branch (andrewbranch)
approved these changes
Nov 13, 2026
Jake Bailey (jakebailey)
deleted the
compiler-fixes/fourslash-discovery
branch
November 14, 2026 00:16
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.
Two things:
_js_test.gonaming broke because Go treatsjsasGOOS. Oops.