Skip to content

Conversation

@jakebailey
Copy link
Member

I was working on another missing thing and there were some tests missing. So, add:

  • numberOfErrorsInCurrentFile
  • noErrors
  • errorExistsAtRange
  • currentLineContentIs
  • currentFileContentIs
  • errorExistsBetweenMarkers
  • errorExistsAfterMarker
  • errorExistsBeforeMarker

Copy link
Contributor

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 pull request ports several fourslash test helper functions from the TypeScript reference implementation to enable more comprehensive testing. The PR adds 8 new test assertion functions and updates baselines for multiple existing fourslash tests, particularly for goToDefinition, findRenameLocations, findAllReferences, quickInfo, and documentSymbols features.

Key Changes:

  • Added 8 new fourslash assertion functions: numberOfErrorsInCurrentFile, noErrors, errorExistsAtRange, currentLineContentIs, currentFileContentIs, errorExistsBetweenMarkers, errorExistsAfterMarker, and errorExistsBeforeMarker
  • Generated/updated 100+ test files using these new functions
  • Updated baseline files to reflect improved test output formatting and behavior convergence with the TypeScript reference implementation

Reviewed changes

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

File Description
internal/fourslash/tests/gen/*_test.go Generated test files using the newly ported fourslash functions for error checking, content verification, and test assertions
testdata/baselines/reference/**/*.baseline* Updated baseline files showing improved convergence with TypeScript reference implementation, particularly for goToDefinition, rename, and reference finding features

Copy link
Member

@gabritto gabritto left a comment

Choose a reason for hiding this comment

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

Left an optional comment, but this looks good, thanks! And many more tests to fix... 🙂

@jakebailey jakebailey requested a review from gabritto December 11, 2025 17:18
@jakebailey jakebailey enabled auto-merge December 11, 2025 17:19
@jakebailey jakebailey added this pull request to the merge queue Dec 11, 2025
Merged via the queue into main with commit 7d91cac Dec 11, 2025
22 of 23 checks passed
@jakebailey jakebailey deleted the jabaile/more-fourslash branch December 11, 2025 17:52
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