Skip to content

Adding manual tests list #1446

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 3 commits into
base: main
Choose a base branch
from

Conversation

navya9singh
Copy link
Member

After tests are generated with npm run convertfourslash, if we need to edit them manually, then this script can be run by
npm run manualtest testname. This creates a manual folder under fourslash/tests/ and adds the name of the test to manualTests.txt.

  • All tests in manualTests.txt will ne skipped and not regenerated when convertfourslash is run again.
  • Once a manual folder is created, testOutput = cp.execFileSync(go, ["test", "./internal/fourslash/tests/gen"], ["test", "./internal/fourslash/tests/manual"], { encoding: "utf-8" }) can be added to updateFailing.mts to run all the tests under ./manual and update failingtests.txt accordingly.

@navya9singh navya9singh requested review from Copilot and gabritto and removed request for Copilot July 24, 2025 18:19
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 adds functionality to manually manage fourslash tests by creating a script that moves generated tests to a separate manual directory and tracks them to prevent regeneration. The purpose is to allow developers to edit auto-generated tests without losing changes when the conversion script runs again.

Key changes:

  • Adds a new npm script makemanual that moves tests from generated to manual directory
  • Implements tracking of manual tests to skip them during regeneration
  • Updates the conversion script to respect manual test exclusions

Reviewed Changes

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

File Description
package.json Adds new npm script makemanual for manual test management
internal/fourslash/_scripts/makeManual.mts New script that moves tests to manual directory and tracks them
internal/fourslash/_scripts/convertFourslash.mts Updates conversion logic to skip manual tests during regeneration

Comment on lines +12 to +14
if (args.length === 0) {
process.exit(1);
}
Copy link
Preview

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

The script exits with code 1 when no arguments are provided, but doesn't provide any error message to explain what went wrong or how to use the script correctly.

Suggested change
if (args.length === 0) {
process.exit(1);
}
if (args.length === 0) {
console.error("Error: No arguments provided.");
console.error("Usage: node makeManual.mts <testName>");
console.error("Provide the name of the test to move from the 'gen' directory to the 'manual' directory.");
process.exit(1);
}

Copilot uses AI. Check for mistakes.

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.

1 participant