Skip to content

noslash #991

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 63 commits into from
Jun 6, 2025
Merged

noslash #991

merged 63 commits into from
Jun 6, 2025

Conversation

gabritto
Copy link
Member

@gabritto gabritto commented May 30, 2025

This PR adds the basics of fourslash tests to Corsa.

  • There's now a fourslash package with the basic setup for running fourslash tests.
    • The new fourslash setup creates a server and talks to it, so this would be closer to "fourslash server" tests in Strada. I think we won't need the non-server tests.
  • There's a script for converting between Strada fourslash in internal/fourslash/_scripts/convertFourslash.mts.
    • You can do npm run convertfourslash to run the script.
    • The script optionally takes in a file containing a list of Strada tests to translate. This is useful when working on the script to make it attempt to translate only tests that are related to e.g. completions.
    • The script outputs a list of files it failed to parse, and it logs the reason things failed to stderr.
    • Generated tests that currently fail are skipped via t.Skip(). The current list of tests expected to fail is in internal/fourslash/_scripts/failedTests.txt.

Didn't yet include all the generated tests in the PR because it'd break GitHub.
Included example of a test the script generates: https://github.com/microsoft/typescript-go/pull/991/files#diff-9c51d0662c595fdc5d7eb5e3521e692c744a7711906f1bcceee767b32cfb9252R11

Planning to do in future PRs:

  • CI action to verify that the checked-in generated fourslash tests match what the script generates.

  • Better panic handling for the server, and better error message for fourslash tests when server panics.
    For reference, here's what a panic in the server currently looks like:
    image

  • Improve script to parse more completions tests.

  • Completion baselines.

@iisaduan is working on handling ranges.

@gabritto gabritto changed the title Gabritto/noslash noslash Jun 2, 2025
@gabritto
Copy link
Member Author

gabritto commented Jun 6, 2025

Race mode test failure should be fixed by #1075.

@gabritto gabritto closed this Jun 6, 2025
@gabritto gabritto reopened this Jun 6, 2025
@gabritto gabritto added this pull request to the merge queue Jun 6, 2025
Merged via the queue into main with commit 4fb7922 Jun 6, 2025
23 checks passed
@gabritto gabritto deleted the gabritto/noslash branch June 6, 2025 20:55
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