Skip to content

Fourslash: open all test files #1422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2025
Merged

Fourslash: open all test files #1422

merged 3 commits into from
Jul 22, 2025

Conversation

gabritto
Copy link
Member

This PR makes fourslash open all test files upon initialization. This is needed because, in the absence of a tsconfig.json in the test files, the unopened files would not be part of the program.
In Strada we didn't have this problem with regular fourslash tests because fourslash would construct a program with all the test files explicitly. So now that we're running fourslash by calling the server, we need to open all the files so that they become part of an inferred project and thus part of the program we use for completions etc.

Base automatically changed from gabritto/vscodetests to main July 22, 2025 03:16
@gabritto gabritto dismissed DanielRosenwasser’s stale review July 22, 2025 03:16

The base branch was changed.

@gabritto gabritto marked this pull request as ready for review July 22, 2025 16:03
@Copilot Copilot AI review requested due to automatic review settings July 22, 2025 16:03
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modifies fourslash tests to open all test files during initialization instead of just the first file. This ensures that all files are included in the language server program when a tsconfig.json is not present, fixing issues where unopened files would not be part of inferred projects and thus unavailable for language server operations like completions and find-all-references.

  • Opens all test files during fourslash initialization
  • Fixes test baseline files to show expected cross-file reference results
  • Re-enables 4 JavaScript module tests that now pass with proper file opening

Reviewed Changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.

File Description
internal/fourslash/fourslash.go Modified to open all test files instead of just the first one
internal/fourslash/_scripts/failingTests.txt Removed 4 JavaScript module tests from failing list and added 2 JSDoc tests
Multiple baseline files Updated to show proper cross-file reference results
Multiple test files Removed t.Skip() calls to re-enable now-passing tests

@gabritto gabritto added this pull request to the merge queue Jul 22, 2025
Merged via the queue into main with commit 53e5c70 Jul 22, 2025
22 checks passed
@gabritto gabritto deleted the gabritto/fixes2 branch July 22, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants