Skip to content

Add edit functionality to fourslash #1310

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add edit functionality to fourslash #1310

wants to merge 6 commits into from

Conversation

gabritto
Copy link
Member

This PR adds functions like edit.insert(...) to fourslash, and enables the test conversion script to convert Strada tests that use those functions.

Note that the fourslash test object now has to keep track of file changes, so it has a map of scriptInfos. It also has to convert between absolute positions and LSP positions.

This PR adds 41 new converted tests, 24 of which are skipped due to failing.

@jakebailey
Copy link
Member

The git diff is showing stuff I think has already been merged in main; bad merge maybe?

@gabritto
Copy link
Member Author

The git diff is showing stuff I think has already been merged in main; bad merge maybe?

No, I'm just rebasing and re-generating stuff right now, you just looked before I'm done with it 😅


testData *TestData
testData *TestData // !!! consolidate test files from test data and script info
Copy link
Member Author

Choose a reason for hiding this comment

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

Weirdly some requests in Strada's fourslash use the original files instead of the fourslash object's script info with the updated content, so I'm not sure how things are gonna go and have kept the whole test data here for now.

@gabritto gabritto marked this pull request as ready for review June 27, 2025 23:49
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.

2 participants