Skip to content

Commit fbc1dec

Browse files
committed
Place DO NOT EDIT comment on top of generated fourslash tests
1 parent 4b4977a commit fbc1dec

File tree

2,584 files changed

+6281
-2216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,584 files changed

+6281
-2216
lines changed

internal/fourslash/_scripts/convertFourslash.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2116,7 +2116,9 @@ function generateGoTest(failingTests: Set<string>, test: GoTest, isServer: boole
21162116
imports.push(`. "github.com/microsoft/typescript-go/internal/fourslash/tests/util"`);
21172117
}
21182118
imports.push(`"github.com/microsoft/typescript-go/internal/testutil"`);
2119-
const template = `package fourslash_test
2119+
const template = `// Code generated by convertFourslash.mts; DO NOT EDIT.
2120+
2121+
package fourslash_test
21202122
21212123
import (
21222124
"testing"

internal/fourslash/_scripts/makeManual.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ function main() {
6363

6464
function markAsManual(genFilePath: string, manualFilePath: string) {
6565
const content = fs.readFileSync(genFilePath, "utf-8");
66-
const updatedContent = content.replace(/^\s*t\.Skip\(\)\s*$/m, "");
66+
let updatedContent = content.replace(/^\s*t\.Skip\(\)\s*$/m, "");
67+
// Remove the generated header comment
68+
updatedContent = updatedContent.replace(/^\/\/ Code generated by convertFourslash\.mts; DO NOT EDIT\.\n\n/, "");
6769
fs.writeFileSync(manualFilePath, updatedContent, "utf-8");
6870
fs.rmSync(genFilePath);
6971
}

internal/fourslash/tests/gen/addDeclareToModule_test.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/fourslash/tests/gen/addDuplicateSetter_test.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/fourslash/tests/gen/addFunctionAboveMultiLineLambdaExpression_test.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/fourslash/tests/gen/addInterfaceMemberAboveClass_test.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/fourslash/tests/gen/addInterfaceToNotSatisfyConstraint_test.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/fourslash/tests/gen/addMemberToModule_test.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/fourslash/tests/gen/addSignaturePartial_test.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/fourslash/tests/gen/aliasMergingWithNamespace_test.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)