-
Notifications
You must be signed in to change notification settings - Fork 662
Implement MarkerNames()
in fourslash
#1450
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
Conversation
There was a problem hiding this 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 implements the MarkerNames()
method in the fourslash testing framework and enables several previously skipped tests related to "go to definition" functionality. The implementation extracts marker names from test data and integrates with the test conversion script to support the ...test.markerNames()
pattern.
Key changes:
- Adds
MarkerNames()
method to extract named markers from fourslash test data - Updates test conversion script to handle
...test.markerNames()
expressions - Enables three previously skipped "go to definition" tests with proper marker name handling
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
internal/fourslash/fourslash.go | Implements MarkerNames() method using MapFiltered to extract marker names |
internal/core/core.go | Adds MapFiltered utility function for filtering and mapping slices |
internal/fourslash/_scripts/convertFourslash.mts | Updates conversion script to handle ...test.markerNames() expressions |
internal/fourslash/tests/gen/*_test.go | Removes t.Skip() calls and updates method calls to use f.MarkerNames()... |
internal/fourslash/_scripts/failingTests.txt | Removes three tests from the failing tests list |
testdata/baselines/reference/fourslash//.baseline.jsonc | New baseline files for enabled tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this change is sketchy - but I think it is possibly due to a bug in the baselining logic. My guess is that baselining is currently too eager. Any test that requests multiple baselines where an edit has occurred in between probably fails because any of the following might be true:
- the baselines were never accepted so the test could never succeed
- the second baseline call will always read the results of the first baseline, and is assumed to fail
- the second baseline was accepted, so the first call will always fail
No description provided.