vendor tsgo
This commit is contained in:
4715
tools/tsgo/internal/fourslash/_scripts/convertFourslash.mts
Normal file
4715
tools/tsgo/internal/fourslash/_scripts/convertFourslash.mts
Normal file
File diff suppressed because it is too large
Load Diff
1
tools/tsgo/internal/fourslash/_scripts/crashingTests.txt
Normal file
1
tools/tsgo/internal/fourslash/_scripts/crashingTests.txt
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
459
tools/tsgo/internal/fourslash/_scripts/failingTests.txt
Normal file
459
tools/tsgo/internal/fourslash/_scripts/failingTests.txt
Normal file
@@ -0,0 +1,459 @@
|
||||
TestAliasMergingWithNamespace
|
||||
TestAllowLateBoundSymbolsOverwriteEarlyBoundSymbols
|
||||
TestAmbientShorthandGotoDefinition
|
||||
TestArgumentsAreAvailableAfterEditsAtEndOfFunction
|
||||
TestAugmentedTypesClass1
|
||||
TestAutoImportAllowImportingTsExtensionsPackageJsonImports1
|
||||
TestAutoImportCompletionAmbientMergedModule1
|
||||
TestAutoImportCompletionExportListAugmentation1
|
||||
TestAutoImportCompletionExportListAugmentation2
|
||||
TestAutoImportCompletionExportListAugmentation3
|
||||
TestAutoImportCompletionExportListAugmentation4
|
||||
TestAutoImportCrossProject_symlinks_stripSrc
|
||||
TestAutoImportCrossProject_symlinks_toDist
|
||||
TestAutoImportFileExcludePatterns10
|
||||
TestAutoImportFileExcludePatterns11
|
||||
TestAutoImportFileExcludePatterns3
|
||||
TestAutoImportFileExcludePatterns5
|
||||
TestAutoImportFileExcludePatterns6
|
||||
TestAutoImportFileExcludePatterns9
|
||||
TestAutoImportJsDocImport1
|
||||
TestAutoImportModuleNone2
|
||||
TestAutoImportNodeModuleSymlinkRenamed
|
||||
TestAutoImportNodeNextJSRequire
|
||||
TestAutoImportPackageJsonImportsCaseSensitivity
|
||||
TestAutoImportPackageRootPath
|
||||
TestAutoImportPathsNodeModules
|
||||
TestAutoImportProvider_exportMap2
|
||||
TestAutoImportProvider_exportMap9
|
||||
TestAutoImportProvider_globalTypingsCache
|
||||
TestAutoImportProvider9
|
||||
TestAutoImportRelativePathToMonorepoPackage
|
||||
TestAutoImportSortCaseSensitivity1
|
||||
TestAutoImportTypeImport4
|
||||
TestAutoImportTypeOnlyPreferred3
|
||||
TestAutoImportVerbatimTypeOnly1
|
||||
TestCloduleTypeOf1
|
||||
TestCodeCompletionEscaping
|
||||
TestCodeFixAddParameterNames1
|
||||
TestCodeFixAddParameterNames2
|
||||
TestCodeFixAddParameterNames3
|
||||
TestCodeFixClassExtendAbstractSomePropertiesPresent
|
||||
TestCodeFixClassImplementInterfaceNoTruncation
|
||||
TestCodeFixClassSuperMustPrecedeThisAccess
|
||||
TestCodeFixCorrectQualifiedNameToIndexedAccessType01
|
||||
TestCodeFixInferFromCallInAssignment
|
||||
TestCodeFixInferFromExpressionStatement
|
||||
TestCodeFixInferFromFunctionThisUsageObjectProperty
|
||||
TestCodeFixInferFromFunctionThisUsageObjectPropertyParameter
|
||||
TestCodeFixInferFromFunctionThisUsageObjectPropertyShorthand
|
||||
TestCodeFixInferFromFunctionThisUsageObjectPropertyShorthandParameter
|
||||
TestCodeFixInferFromFunctionUsage
|
||||
TestCodeFixInferFromPrimitiveUsage
|
||||
TestCodeFixInferFromUsageCall
|
||||
TestCodeFixInferFromUsageMember
|
||||
TestCodeFixInferFromUsageMember2
|
||||
TestCodeFixInferFromUsageMember3
|
||||
TestCodefixInferFromUsageNullish
|
||||
TestCodeFixInferFromUsageOptionalParam
|
||||
TestCodeFixInferFromUsageOptionalParam2
|
||||
TestCodeFixInferFromUsageRestParam
|
||||
TestCodeFixInferFromUsageRestParam2
|
||||
TestCodeFixInferFromUsageRestParam3
|
||||
TestCodeFixInferFromUsageVariable3JS
|
||||
TestCodeFixMissingTypeAnnotationOnExports16
|
||||
TestCodeFixMissingTypeAnnotationOnExports23_heritage_formatting
|
||||
TestCodeFixMissingTypeAnnotationOnExports25_heritage_formatting_3
|
||||
TestCodeFixMissingTypeAnnotationOnExports28_long_types
|
||||
TestCodeFixSpelling4
|
||||
TestCodeFixSpelling5
|
||||
TestCodeFixSpellingCaseSensitive1
|
||||
TestCodeFixSpellingCaseSensitive2
|
||||
TestCodeFixSpellingCaseSensitive3
|
||||
TestCodeFixSpellingCaseWeight1
|
||||
TestCodeFixSpellingCaseWeight2
|
||||
TestCodeFixSpellingShortName1
|
||||
TestCodeFixTopLevelAwait_module_targetES2017CompilerOptionsInTsConfig
|
||||
TestCodeFixTopLevelForAwait_module_targetES2017CompilerOptionsInTsConfig
|
||||
TestCodeFixUndeclaredPropertyAccesses
|
||||
TestCodeFixUnusedIdentifier_suggestion
|
||||
TestCodeFixUnusedInterfaceInNamespace1
|
||||
TestCodeFixUnusedInterfaceInNamespace2
|
||||
TestCommentsEnumsFourslash
|
||||
TestCommentsExternalModulesFourslash
|
||||
TestCommentsImportDeclaration
|
||||
TestCommentsInheritanceFourslash
|
||||
TestCommentsInterfaceFourslash
|
||||
TestCommentsLinePreservation
|
||||
TestCommentsOverloadsFourslash
|
||||
TestCommentsVariables
|
||||
TestCompletionAfterQuestionDot
|
||||
TestCompletionAutoInsertQuestionDot
|
||||
TestCompletionCloneQuestionToken
|
||||
TestCompletionEntryClassMembersWithInferredFunctionReturnType1
|
||||
TestCompletionEntryForArgumentConstrainedToString
|
||||
TestCompletionEntryForArrayElementConstrainedToString
|
||||
TestCompletionEntryForArrayElementConstrainedToString2
|
||||
TestCompletionEntryForUnionProperty
|
||||
TestCompletionEntryForUnionProperty2
|
||||
TestCompletionForComputedStringProperties
|
||||
TestCompletionForMetaProperty
|
||||
TestCompletionForObjectProperty
|
||||
TestCompletionForStringLiteral
|
||||
TestCompletionForStringLiteral_quotePreference
|
||||
TestCompletionForStringLiteral_quotePreference1
|
||||
TestCompletionForStringLiteral_quotePreference2
|
||||
TestCompletionForStringLiteral_quotePreference3
|
||||
TestCompletionForStringLiteral_quotePreference4
|
||||
TestCompletionForStringLiteral_quotePreference5
|
||||
TestCompletionForStringLiteral_quotePreference6
|
||||
TestCompletionForStringLiteral_quotePreference7
|
||||
TestCompletionForStringLiteral_quotePreference8
|
||||
TestCompletionForStringLiteral4
|
||||
TestCompletionImportMeta
|
||||
TestCompletionImportMetaWithGlobalDeclaration
|
||||
TestCompletionImportModuleSpecifierEndingUnsupportedExtension
|
||||
TestCompletionInChecks1
|
||||
TestCompletionInFunctionLikeBody_includesPrimitiveTypes
|
||||
TestCompletionInUncheckedJSFile
|
||||
TestCompletionListBuilderLocations_VariableDeclarations
|
||||
TestCompletionListForDerivedType1
|
||||
TestCompletionListInArrowFunctionInUnclosedCallSite01
|
||||
TestCompletionListInNamedFunctionExpression
|
||||
TestCompletionListInNamedFunctionExpression1
|
||||
TestCompletionListInNamedFunctionExpressionWithShadowing
|
||||
TestCompletionListInScope
|
||||
TestCompletionListInScope_doesNotIncludeAugmentations
|
||||
TestCompletionListInTemplateLiteralParts1
|
||||
TestCompletionListInUnclosedCommaExpression01
|
||||
TestCompletionListInUnclosedCommaExpression02
|
||||
TestCompletionListInUnclosedFunction08
|
||||
TestCompletionListInUnclosedFunction09
|
||||
TestCompletionListInUnclosedTaggedTemplate01
|
||||
TestCompletionListInUnclosedTaggedTemplate02
|
||||
TestCompletionListInUnclosedTemplate01
|
||||
TestCompletionListInUnclosedTemplate02
|
||||
TestCompletionListInvalidMemberNames
|
||||
TestCompletionListInvalidMemberNames_escapeQuote
|
||||
TestCompletionListInvalidMemberNames_startWithSpace
|
||||
TestCompletionListInvalidMemberNames_withExistingIdentifier
|
||||
TestCompletionListInvalidMemberNames2
|
||||
TestCompletionListOnAliases
|
||||
TestCompletionListsStringLiteralTypeAsIndexedAccessTypeObject
|
||||
TestCompletionListStringParenthesizedExpression
|
||||
TestCompletionListStringParenthesizedType
|
||||
TestCompletionListWithoutVariableinitializer
|
||||
TestCompletionNoAutoInsertQuestionDotForThis
|
||||
TestCompletionNoAutoInsertQuestionDotForTypeParameter
|
||||
TestCompletionNoAutoInsertQuestionDotWithUserPreferencesOff
|
||||
TestCompletionOfAwaitPromise1
|
||||
TestCompletionOfAwaitPromise2
|
||||
TestCompletionOfAwaitPromise3
|
||||
TestCompletionOfAwaitPromise5
|
||||
TestCompletionOfAwaitPromise6
|
||||
TestCompletionOfAwaitPromise7
|
||||
TestCompletionOfInterfaceAndVar
|
||||
TestCompletionPreferredSuggestions1
|
||||
TestCompletionsBeforeRestArg1
|
||||
TestCompletionsClassMemberImportTypeNodeParameter1
|
||||
TestCompletionsClassMemberImportTypeNodeParameter2
|
||||
TestCompletionsClassMemberImportTypeNodeParameter3
|
||||
TestCompletionsClassMemberImportTypeNodeParameter4
|
||||
TestCompletionsElementAccessNumeric
|
||||
TestCompletionsExportImport
|
||||
TestCompletionsImport_default_anonymous
|
||||
TestCompletionsImport_details_withMisspelledName
|
||||
TestCompletionsImport_exportEquals_global
|
||||
TestCompletionsImport_filteredByInvalidPackageJson_direct
|
||||
TestCompletionsImport_filteredByPackageJson_direct
|
||||
TestCompletionsImport_filteredByPackageJson_nested
|
||||
TestCompletionsImport_filteredByPackageJson_peerDependencies
|
||||
TestCompletionsImport_filteredByPackageJson_typesImplicit
|
||||
TestCompletionsImport_filteredByPackageJson_typesOnly
|
||||
TestCompletionsImport_named_didNotExistBefore
|
||||
TestCompletionsImport_noSemicolons
|
||||
TestCompletionsImport_quoteStyle
|
||||
TestCompletionsImport_umdDefaultNoCrash1
|
||||
TestCompletionsImport_uriStyleNodeCoreModules2
|
||||
TestCompletionsImport_uriStyleNodeCoreModules3
|
||||
TestCompletionsImport_windowsPathsProjectRelative
|
||||
TestCompletionsImportOrExportSpecifier
|
||||
TestCompletionsInExport
|
||||
TestCompletionsInExport_moduleBlock
|
||||
TestCompletionsJSDocNoCrash1
|
||||
TestCompletionsJsdocTypeTagCast
|
||||
TestCompletionsJsxAttributeInitializer2
|
||||
TestCompletionsLiteralFromInferenceWithinInferredType3
|
||||
TestCompletionsLiterals
|
||||
TestCompletionsMergedDeclarations1
|
||||
TestCompletionsNewTarget
|
||||
TestCompletionsOptionalMethod
|
||||
TestCompletionsOverridingMethod1
|
||||
TestCompletionsOverridingMethod10
|
||||
TestCompletionsOverridingMethod11
|
||||
TestCompletionsOverridingMethod14
|
||||
TestCompletionsOverridingMethod17
|
||||
TestCompletionsOverridingMethod2
|
||||
TestCompletionsOverridingMethod3
|
||||
TestCompletionsOverridingMethod4
|
||||
TestCompletionsOverridingMethod9
|
||||
TestCompletionsOverridingMethodCrash1
|
||||
TestCompletionsOverridingProperties1
|
||||
TestCompletionsRecommended_namespace
|
||||
TestCompletionsRecommended_union
|
||||
TestCompletionsRedeclareModuleAsGlobal
|
||||
TestCompletionsStringsWithTriggerCharacter
|
||||
TestCompletionsSymbolMembers
|
||||
TestCompletionsTriggerCharacter
|
||||
TestCompletionsTuple
|
||||
TestCompletionsUniqueSymbol_import
|
||||
TestCompletionsUniqueSymbol1
|
||||
TestCompletionsWithDeprecatedTag10
|
||||
TestConstQuickInfoAndCompletionList
|
||||
TestContextuallyTypedFunctionExpressionGeneric1
|
||||
TestContextualTypingOfGenericCallSignatures2
|
||||
TestDocCommentTemplateClassDecl01
|
||||
TestDocCommentTemplateClassDeclMethods01
|
||||
TestDocCommentTemplateFunctionExpression
|
||||
TestDocCommentTemplateIndentation
|
||||
TestDocCommentTemplateJsSpecialPropertyAssignment
|
||||
TestDocCommentTemplatePrototypeMethod
|
||||
TestDocCommentTemplateWithMultipleJSDoc1
|
||||
TestDocCommentTemplateWithMultipleJSDoc3
|
||||
TestDocCommentTemplateWithMultipleJSDocAndParameters
|
||||
TestDoubleUnderscoreCompletions
|
||||
TestEditJsdocType
|
||||
TestErrorsAfterResolvingVariableDeclOfMergedVariableAndClassDecl
|
||||
TestExportDefaultClass
|
||||
TestExportDefaultFunction
|
||||
TestExportEqualTypes
|
||||
TestFindAllRefs_importType_js1
|
||||
TestFindAllRefs_importType_js2
|
||||
TestFindAllRefs_importType_js3
|
||||
TestFormatDotAfterNumber
|
||||
TestFormatNoSpaceAfterTemplateHeadAndMiddle
|
||||
TestFormatSpaceAfterTemplateHeadAndMiddle
|
||||
TestFormattingObjectLiteralOpenCurlyNewlineTyping
|
||||
TestFormattingObjectLiteralOpenCurlySingleLine
|
||||
TestFormattingOnInvalidCodes
|
||||
TestFormattingOnObjectLiteral
|
||||
TestFormatV8Directive
|
||||
TestFunduleWithRecursiveReference
|
||||
TestGenericCombinators3
|
||||
TestGenericCombinatorWithConstraints1
|
||||
TestGenericFunctionWithGenericParams1
|
||||
TestGetJavaScriptCompletions10
|
||||
TestGetJavaScriptCompletions12
|
||||
TestGetJavaScriptCompletions13
|
||||
TestGetJavaScriptCompletions15
|
||||
TestGetJavaScriptCompletions20
|
||||
TestGetJavaScriptCompletions8
|
||||
TestGetJavaScriptCompletions9
|
||||
TestGetJavaScriptGlobalCompletions1
|
||||
TestGetJavaScriptQuickInfo1
|
||||
TestGetJavaScriptQuickInfo2
|
||||
TestGetJavaScriptQuickInfo3
|
||||
TestGetJavaScriptQuickInfo4
|
||||
TestGetJavaScriptQuickInfo5
|
||||
TestGetJavaScriptQuickInfo6
|
||||
TestGetJavaScriptQuickInfo7
|
||||
TestGetJavaScriptSyntacticDiagnostics24
|
||||
TestGetJSXOutliningSpans
|
||||
TestHoverOverComment
|
||||
TestImportCompletionsPackageJsonImportsPatternRootWildcard
|
||||
TestImportFixesGlobalTypingsCache
|
||||
TestImportMetaCompletionDetails
|
||||
TestImportNameCodeFix_externalNonRelative1
|
||||
TestImportNameCodeFix_jsx4
|
||||
TestImportNameCodeFix_jsx6
|
||||
TestImportNameCodeFix_noDestructureNonObjectLiteral
|
||||
TestImportNameCodeFix_order2
|
||||
TestImportNameCodeFix_preferBaseUrl
|
||||
TestImportNameCodeFix_reExportDefault
|
||||
TestImportNameCodeFix_require
|
||||
TestImportNameCodeFix_require_addToExisting
|
||||
TestImportNameCodeFix_require_importVsRequire_addToExistingWins
|
||||
TestImportNameCodeFix_symlink_own_package_2
|
||||
TestImportNameCodeFix_uriStyleNodeCoreModules2
|
||||
TestImportNameCodeFix_uriStyleNodeCoreModules3
|
||||
TestImportNameCodeFixDefaultExport4
|
||||
TestImportNameCodeFixNewImportBaseUrl0
|
||||
TestImportNameCodeFixNewImportBaseUrl1
|
||||
TestImportNameCodeFixNewImportBaseUrl2
|
||||
TestImportNameCodeFixNewImportFile2
|
||||
TestImportNameCodeFixNewImportTypeRoots1
|
||||
TestImportStatementCompletions_esModuleInterop2
|
||||
TestImportStatementCompletions_noSnippet
|
||||
TestImportStatementCompletions_pnpm1
|
||||
TestImportStatementCompletions_quotes
|
||||
TestImportStatementCompletions_semicolons
|
||||
TestImportSuggestionsCache_invalidPackageJson
|
||||
TestImportTypeCompletions1
|
||||
TestImportTypeCompletions3
|
||||
TestImportTypeCompletions4
|
||||
TestImportTypeCompletions6
|
||||
TestImportTypeCompletions7
|
||||
TestImportTypeCompletions8
|
||||
TestImportTypeCompletions9
|
||||
TestIndirectClassInstantiation
|
||||
TestJavascriptModules20
|
||||
TestJavascriptModules24
|
||||
TestJsDocAugments
|
||||
TestJsDocAugmentsAndExtends
|
||||
TestJsdocCallbackTag
|
||||
TestJsDocExtends
|
||||
TestJsDocFunctionSignatures10
|
||||
TestJsDocFunctionSignatures13
|
||||
TestJsDocFunctionSignatures7
|
||||
TestJsDocFunctionSignatures8
|
||||
TestJsDocGenerics2
|
||||
TestJsDocInheritDoc
|
||||
TestJsDocPropertyDescription1
|
||||
TestJsDocPropertyDescription11
|
||||
TestJsDocPropertyDescription4
|
||||
TestJsDocPropertyDescription6
|
||||
TestJsDocPropertyDescription7
|
||||
TestJsDocPropertyDescription9
|
||||
TestJsDocTagsWithHyphen
|
||||
TestJsdocTemplatePrototypeCompletions
|
||||
TestJsdocTypedefTag
|
||||
TestJsdocTypedefTagNamespace
|
||||
TestJsFileImportNoTypes2
|
||||
TestJsQuickInfoGenerallyAcceptableSize
|
||||
TestJsRequireQuickInfo
|
||||
TestJsxAttributeCompletionStyleAuto
|
||||
TestJsxAttributeCompletionStyleBraces
|
||||
TestJsxAttributeCompletionStyleDefault
|
||||
TestJsxAttributeCompletionStyleNone
|
||||
TestJsxAttributeCompletionStyleNoSnippet
|
||||
TestJsxAttributeSnippetCompletionAfterTypeArgs
|
||||
TestJsxAttributeSnippetCompletionClosed
|
||||
TestJsxAttributeSnippetCompletionUnclosed
|
||||
TestJsxWithTypeParametershasInstantiatedSignatureHelp
|
||||
TestLetQuickInfoAndCompletionList
|
||||
TestLocalFunction
|
||||
TestMemberListInReopenedEnum
|
||||
TestMemberListInWithBlock
|
||||
TestMemberListOfExportedClass
|
||||
TestMultiModuleFundule
|
||||
TestNgProxy1
|
||||
TestNgProxy4
|
||||
TestNoQuickInfoForLabel
|
||||
TestNoQuickInfoInWhitespace
|
||||
TestOverloadQuickInfo
|
||||
TestProtoVarVisibleWithOuterScopeUnderscoreProto
|
||||
TestQuickfixImplementInterfaceUnreachableTypeUsesRelativeImport
|
||||
TestQuickInfo_notInsideComment
|
||||
TestQuickinfo01
|
||||
TestQuickInfoBindingPatternInJsdocNoCrash1
|
||||
TestQuickInfoCloduleWithRecursiveReference
|
||||
TestQuickInfoContextuallyTypedSignatureOptionalParameterFromIntersection1
|
||||
TestQuickInfoContextualTyping
|
||||
TestQuickInfoDisplayPartsIife
|
||||
TestQuickInfoElementAccessDeclaration
|
||||
TestQuickInfoForConstTypeReference
|
||||
TestQuickInfoForContextuallyTypedArrowFunctionInSuperCall
|
||||
TestQuickInfoForGenericConstraints1
|
||||
TestQuickInfoForGenericTaggedTemplateExpression
|
||||
TestQuickInfoForGetterAndSetter
|
||||
TestQuickInfoForIndexerResultWithConstraint
|
||||
TestQuickInfoForTypeofParameter
|
||||
TestQuickInfoForTypeParameterInTypeAlias2
|
||||
TestQuickInfoForUMDModuleAlias
|
||||
TestQuickinfoForUnionProperty
|
||||
TestQuickInfoFromContextualUnionType2
|
||||
TestQuickInfoFromContextualUnionType3
|
||||
TestQuickInfoFunctionKeyword
|
||||
TestQuickInfoGenerics
|
||||
TestQuickInfoGetterSetter
|
||||
TestQuickInfoInInvalidIndexSignature
|
||||
TestQuickInfoInJsdocInTsFile1
|
||||
TestQuickInfoJSDocBackticks
|
||||
TestQuickInfoJsdocEnum
|
||||
TestQuickInfoJSDocFunctionNew
|
||||
TestQuickInfoJSDocFunctionThis
|
||||
TestQuickInfoJsDocGetterSetterNoCrash1
|
||||
TestQuickInfoJsdocTypedefMissingType
|
||||
TestQuickInfoJSExport
|
||||
TestQuickInfoMappedSpreadTypes
|
||||
TestQuickInfoMappedType
|
||||
TestQuickInfoMeaning
|
||||
TestQuickInfoModuleVariables
|
||||
TestQuickInfoNarrowedTypeOfAliasSymbol
|
||||
TestQuickInfoOnArgumentsInsideFunction
|
||||
TestQuickInfoOnCatchVariable
|
||||
TestQuickInfoOnClosingJsx
|
||||
TestQuickInfoOnElementAccessInWriteLocation4
|
||||
TestQuickInfoOnElementAccessInWriteLocation5
|
||||
TestQuickInfoOnExpandoLikePropertyWithSetterDeclarationJs1
|
||||
TestQuickInfoOnExpandoLikePropertyWithSetterDeclarationJs2
|
||||
TestQuickInfoOnGenericWithConstraints1
|
||||
TestQuickInfoOnInternalAliases
|
||||
TestQuickInfoOnMergedModule
|
||||
TestQuickInfoOnNarrowedTypeInModule
|
||||
TestQuickInfoOnObjectLiteralWithAccessors
|
||||
TestQuickInfoOnObjectLiteralWithOnlyGetter
|
||||
TestQuickInfoOnObjectLiteralWithOnlySetter
|
||||
TestQuickInfoOnPropDeclaredUsingIndexSignatureOnInterfaceWithBase
|
||||
TestQuickInfoOnPropertyAccessInWriteLocation4
|
||||
TestQuickInfoOnPropertyAccessInWriteLocation5
|
||||
TestQuickInfoOnThis3
|
||||
TestQuickInfoOnUndefined
|
||||
TestQuickInfoOnVarInArrowExpression
|
||||
TestQuickInfoPrivateIdentifierInTypeReferenceNoCrash1
|
||||
TestQuickInfoSpecialPropertyAssignment
|
||||
TestQuickInfoTemplateTag
|
||||
TestQuickInfoTypeAliasDefinedInDifferentFile
|
||||
TestQuickInfoTypeError
|
||||
TestQuickInfoTypeOfThisInStatics
|
||||
TestQuickInfoTypeOnlyNamespaceAndClass
|
||||
TestQuickInfoUnionOfNamespaces
|
||||
TestQuickInfoUntypedModuleImport
|
||||
TestQuickinfoWrongComment
|
||||
TestRecursiveInternalModuleImport
|
||||
TestRegexDetection
|
||||
TestSelfReferencedExternalModule
|
||||
TestSignatureHelpCallExpressionJs
|
||||
TestStringCompletionsImportOrExportSpecifier
|
||||
TestStringCompletionsVsEscaping
|
||||
TestSuggestionOfUnusedVariableWithExternalModule
|
||||
TestSymbolCompletionLowerPriority
|
||||
TestSyntheticImportFromBabelGeneratedFile1
|
||||
TestSyntheticImportFromBabelGeneratedFile2
|
||||
TestThisPredicateFunctionQuickInfo01
|
||||
TestThisPredicateFunctionQuickInfo02
|
||||
TestTsxQuickInfo4
|
||||
TestTsxQuickInfo5
|
||||
TestTsxQuickInfo6
|
||||
TestTsxQuickInfo7
|
||||
TestUnusedClassInNamespace1
|
||||
TestUnusedClassInNamespace3
|
||||
TestUnusedClassInNamespace4
|
||||
TestUnusedClassInNamespaceWithTrivia1
|
||||
TestUnusedClassInNamespaceWithTrivia2
|
||||
TestUnusedConstantInFunction1
|
||||
TestUnusedEnumInFunction1
|
||||
TestUnusedEnumInNamespace1
|
||||
TestUnusedFunctionInNamespace1
|
||||
TestUnusedFunctionInNamespace2
|
||||
TestUnusedFunctionInNamespace3
|
||||
TestUnusedFunctionInNamespace4
|
||||
TestUnusedFunctionInNamespace5
|
||||
TestUnusedFunctionInNamespaceWithTrivia
|
||||
TestUnusedImports10FS
|
||||
TestUnusedImports11FS
|
||||
TestUnusedImports12FS
|
||||
TestUnusedImports13FS
|
||||
TestUnusedImports14FS
|
||||
TestUnusedImports1FS
|
||||
TestUnusedImports3FS
|
||||
TestUnusedImports4FS
|
||||
TestUnusedImports5FS
|
||||
TestUnusedImports6FS
|
||||
TestUnusedImports7FS
|
||||
TestUnusedImports8FS
|
||||
TestUnusedImports9FS
|
||||
TestUnusedLocalsinConstructorFS1
|
||||
TestUnusedLocalsinConstructorFS2
|
||||
TestUnusedLocalsInFunction1
|
||||
TestUnusedLocalsInFunction3
|
||||
83
tools/tsgo/internal/fourslash/_scripts/makeManual.mts
Normal file
83
tools/tsgo/internal/fourslash/_scripts/makeManual.mts
Normal file
@@ -0,0 +1,83 @@
|
||||
#!/usr/bin/env -S node --experimental-strip-types --no-warnings
|
||||
|
||||
// Usage: node --experimental-strip-types --no-warnings makeManual.mts <testName> [...testNames]
|
||||
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
|
||||
const scriptsDir = import.meta.dirname;
|
||||
const manualTestsPath = path.join(scriptsDir, "manualTests.txt");
|
||||
const genDir = path.join(scriptsDir, "../", "tests", "gen");
|
||||
const manualDir = path.join(scriptsDir, "../", "tests", "manual");
|
||||
const submoduleDir = path.join(scriptsDir, "../../../", "_submodules", "TypeScript", "tests", "cases", "fourslash");
|
||||
|
||||
function main() {
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
if (args.length === 0) {
|
||||
console.error("Please provide the name of the generated test file.");
|
||||
process.exit(1);
|
||||
}
|
||||
const testNames = [];
|
||||
for (const arg of args) {
|
||||
const testName = arg;
|
||||
const testFileName = testName;
|
||||
const genTestFile = path.join(genDir, testFileName + "_test.go");
|
||||
const submoduleTestFile = path.join(submoduleDir, testFileName + ".ts");
|
||||
const submoduleServerTestFile = path.join(submoduleDir, "server", testFileName + ".ts");
|
||||
let testKind: "gen" | "submodule" | "submoduleServer" | undefined;
|
||||
if (fs.existsSync(genTestFile)) {
|
||||
testKind = "gen";
|
||||
}
|
||||
else if (fs.existsSync(submoduleTestFile)) {
|
||||
testKind = "submodule";
|
||||
}
|
||||
else if (fs.existsSync(submoduleServerTestFile)) {
|
||||
testKind = "submoduleServer";
|
||||
}
|
||||
|
||||
if (!testKind) {
|
||||
console.error(
|
||||
`Could not find test neither as '${genTestFile}', nor as '${submoduleTestFile}' or '${submoduleServerTestFile}'.` +
|
||||
`Make sure the test exists in the gen directory or in the submodule.`,
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (!fs.existsSync(manualDir)) {
|
||||
fs.mkdirSync(manualDir, { recursive: true });
|
||||
}
|
||||
|
||||
if (testKind === "gen") {
|
||||
const manualTestFile = path.join(manualDir, path.basename(genTestFile));
|
||||
markAsManual(genTestFile, manualTestFile);
|
||||
}
|
||||
|
||||
testNames.push(testName);
|
||||
}
|
||||
|
||||
let manualTests: string[] = [];
|
||||
if (fs.existsSync(manualTestsPath)) {
|
||||
const content = fs.readFileSync(manualTestsPath, "utf-8");
|
||||
manualTests = content.split("\n").map(line => line.trim()).filter(line => line.length > 0);
|
||||
}
|
||||
|
||||
for (const testName of testNames) {
|
||||
if (!manualTests.includes(testName)) {
|
||||
manualTests.push(testName);
|
||||
}
|
||||
}
|
||||
manualTests.sort((a, b) => a.localeCompare(b, "en-US"));
|
||||
fs.writeFileSync(manualTestsPath, [...manualTests, ""].join("\n"), "utf-8");
|
||||
}
|
||||
|
||||
function markAsManual(genFilePath: string, manualFilePath: string) {
|
||||
const content = fs.readFileSync(genFilePath, "utf-8");
|
||||
const updatedContent = content
|
||||
.replace(/^\/\/ Code generated by convertFourslash; DO NOT EDIT\.\n\/\/ To modify this test, run .*\n\n/m, "")
|
||||
.replace(/^\s*fourslash\.SkipIfFailing\(t\)\s*$/m, "");
|
||||
fs.writeFileSync(manualFilePath, updatedContent, "utf-8");
|
||||
fs.rmSync(genFilePath);
|
||||
}
|
||||
|
||||
main();
|
||||
177
tools/tsgo/internal/fourslash/_scripts/manualTests.txt
Normal file
177
tools/tsgo/internal/fourslash/_scripts/manualTests.txt
Normal file
@@ -0,0 +1,177 @@
|
||||
augmentedTypesModule2
|
||||
autoCloseFragment
|
||||
autoCloseTag
|
||||
autoImportCrossProject_symlinks_toSrc
|
||||
autoImportNoPackageJson_commonjs
|
||||
autoImportNoPackageJson_nodenext
|
||||
autoImportPackageRootPathExtension
|
||||
autoImportPackageRootPathTypeModule
|
||||
autoImportProvider5
|
||||
autoImportSymlinkCaseSensitive
|
||||
codeFixMissingTypeAnnotationOnExports45-decorators
|
||||
codeFixMissingTypeAnnotationOnExports46-decorators-experimental
|
||||
completionForStringLiteral_details
|
||||
completionForStringLiteralExport
|
||||
completionForStringLiteralImport1
|
||||
completionForStringLiteralImport2
|
||||
completionForStringLiteralNonrelativeImport12
|
||||
completionForStringLiteralNonrelativeImport14
|
||||
completionForStringLiteralNonrelativeImport16
|
||||
completionForStringLiteralNonrelativeImport4
|
||||
completionForStringLiteralNonrelativeImport8
|
||||
completionForStringLiteralRelativeImport4
|
||||
completionForStringLiteralWithDynamicImport
|
||||
completionImportModuleSpecifierEndingDts
|
||||
completionImportModuleSpecifierEndingJs
|
||||
completionImportModuleSpecifierEndingJsx
|
||||
completionImportModuleSpecifierEndingTs
|
||||
completionImportModuleSpecifierEndingTsxPreserve
|
||||
completionImportModuleSpecifierEndingTsxReact
|
||||
completionListInClosedFunction05
|
||||
completionListInImportClause05
|
||||
completionListInTypeLiteralInTypeParameter21
|
||||
completionListWithLabel
|
||||
completionsAtIncompleteObjectLiteralProperty
|
||||
completionsImport_defaultAndNamedConflict
|
||||
completionsImport_defaultFalsePositive
|
||||
completionsImport_filteredByPackageJson_ambient
|
||||
completionsImport_reExportDefault
|
||||
completionsImport_reexportTransient
|
||||
completionsPaths_importType
|
||||
completionsPaths_kinds
|
||||
completionsPaths_pathMapping
|
||||
completionsPaths_pathMapping_nonTrailingWildcard1
|
||||
completionsPaths_pathMapping_parentDirectory
|
||||
completionsPathsJsonModule
|
||||
completionsPathsRelativeJsonModule
|
||||
completionsSelfDeclaring1
|
||||
completionsWithDeprecatedTag4
|
||||
completionsWithStringReplacementMode1
|
||||
docCommentTemplateNamespacesAndModules01
|
||||
duplicatePackageServices_fileChanges
|
||||
exhaustiveCaseCompletions1
|
||||
exhaustiveCaseCompletions2
|
||||
exhaustiveCaseCompletions3
|
||||
exhaustiveCaseCompletions4
|
||||
exhaustiveCaseCompletions5
|
||||
exhaustiveCaseCompletions6
|
||||
exhaustiveCaseCompletions7
|
||||
exhaustiveCaseCompletions8
|
||||
formatOnEnterInComment
|
||||
getEditsForFileRename_caseInsensitive
|
||||
getEditsForFileRename_directory_down
|
||||
getEditsForFileRename_directory_up
|
||||
getEditsForFileRename_jsExtension
|
||||
getEditsForFileRename_preferences
|
||||
getEditsForFileRename_preservePathEnding
|
||||
getEditsForFileRename_resolveJsonModule
|
||||
getEditsForFileRename_shortenRelativePaths
|
||||
getEditsForFileRename_subDir
|
||||
getEditsForFileRename_unaffectedNonRelativePath
|
||||
getOutliningSpans
|
||||
importNameCodeFix_typesVersions
|
||||
importNameCodeFix_uriStyleNodeCoreModules1
|
||||
importNameCodeFixDefaultExport5
|
||||
importNameCodeFixDefaultExport7
|
||||
importNameCodeFixJsEnding
|
||||
importNameCodeFixNewImportNodeModules1
|
||||
importNameCodeFixOptionalImport0
|
||||
incrementalParsingWithJsDoc
|
||||
isDefinitionAcrossGlobalProjects
|
||||
jsdocDeprecated_suggestion1
|
||||
jsdocDeprecated_suggestion2
|
||||
jsDocFunctionSignatures12
|
||||
jsDocFunctionSignatures2
|
||||
jsdocParameterNameCompletion
|
||||
linkedEditingJsxTag1
|
||||
linkedEditingJsxTag12
|
||||
linkedEditingJsxTag2
|
||||
linkedEditingJsxTag4
|
||||
linkedEditingJsxTag5
|
||||
linkedEditingJsxTag6
|
||||
linkedEditingJsxTag7
|
||||
linkedEditingJsxTag9
|
||||
navigateItemsLet
|
||||
navigateToImport
|
||||
navigateToSymbolIterator
|
||||
navigationBarFunctionPrototype
|
||||
navigationBarFunctionPrototype2
|
||||
navigationBarFunctionPrototype3
|
||||
navigationBarFunctionPrototype4
|
||||
navigationBarFunctionPrototypeBroken
|
||||
navigationBarFunctionPrototypeInterlaced
|
||||
navigationBarFunctionPrototypeNested
|
||||
navigationBarJsDoc
|
||||
navigationItemsExactMatch2
|
||||
navigationItemsInConstructorsExactMatch
|
||||
navigationItemsPrefixMatch2
|
||||
navigationItemsSpecialPropertyAssignment
|
||||
navto_emptyPattern
|
||||
navto_excludeLib1
|
||||
navto_excludeLib2
|
||||
navto_excludeLib3
|
||||
navto_excludeLib4
|
||||
navto_serverExcludeLib
|
||||
nodeModulesImportCompletions1
|
||||
organizeImportsPathsUnicode3
|
||||
organizeImportsUnicode3
|
||||
outliningForNonCompleteInterfaceDeclaration
|
||||
outliningHintSpansForFunction
|
||||
overloadOnConstCallSignature
|
||||
parserCorruptionAfterMapInClass
|
||||
pathCompletionsPackageJsonExportsBundlerNoNodeCondition
|
||||
pathCompletionsPackageJsonExportsCustomConditions
|
||||
pathCompletionsPackageJsonExportsWildcard1
|
||||
pathCompletionsPackageJsonExportsWildcard10
|
||||
pathCompletionsPackageJsonExportsWildcard11
|
||||
pathCompletionsPackageJsonExportsWildcard12
|
||||
pathCompletionsPackageJsonExportsWildcard2
|
||||
pathCompletionsPackageJsonExportsWildcard3
|
||||
pathCompletionsPackageJsonExportsWildcard4
|
||||
pathCompletionsPackageJsonExportsWildcard5
|
||||
pathCompletionsPackageJsonExportsWildcard6
|
||||
pathCompletionsPackageJsonExportsWildcard7
|
||||
pathCompletionsPackageJsonExportsWildcard8
|
||||
pathCompletionsPackageJsonExportsWildcard9
|
||||
pathCompletionsPackageJsonImportsBundlerNoNodeCondition
|
||||
pathCompletionsPackageJsonImportsCustomConditions
|
||||
pathCompletionsPackageJsonImportsSrcNoDistWildcard1
|
||||
pathCompletionsPackageJsonImportsSrcNoDistWildcard2
|
||||
pathCompletionsPackageJsonImportsSrcNoDistWildcard3
|
||||
pathCompletionsPackageJsonImportsSrcNoDistWildcard4
|
||||
pathCompletionsPackageJsonImportsSrcNoDistWildcard5
|
||||
pathCompletionsPackageJsonImportsSrcNoDistWildcard6
|
||||
pathCompletionsPackageJsonImportsSrcNoDistWildcard7
|
||||
pathCompletionsPackageJsonImportsSrcNoDistWildcard8
|
||||
pathCompletionsPackageJsonImportsSrcNoDistWildcard9
|
||||
pathCompletionsPackageJsonImportsWildcard1
|
||||
pathCompletionsPackageJsonImportsWildcard10
|
||||
pathCompletionsPackageJsonImportsWildcard11
|
||||
pathCompletionsPackageJsonImportsWildcard12
|
||||
pathCompletionsPackageJsonImportsWildcard2
|
||||
pathCompletionsPackageJsonImportsWildcard3
|
||||
pathCompletionsPackageJsonImportsWildcard4
|
||||
pathCompletionsPackageJsonImportsWildcard5
|
||||
pathCompletionsPackageJsonImportsWildcard6
|
||||
pathCompletionsPackageJsonImportsWildcard7
|
||||
pathCompletionsPackageJsonImportsWildcard8
|
||||
pathCompletionsPackageJsonImportsWildcard9
|
||||
pathCompletionsTypesVersionsWildcard3
|
||||
pathCompletionsTypesVersionsWildcard4
|
||||
pathCompletionsTypesVersionsWildcard5
|
||||
pathCompletionsTypesVersionsWildcard6
|
||||
quickInfoForOverloadOnConst1
|
||||
renameDefaultKeyword
|
||||
renameForDefaultExport01
|
||||
semanticClassificationClassExpression
|
||||
semanticModernClassificationFunctions
|
||||
semicolonFormattingInsideAComment
|
||||
semicolonFormattingInsideAStringLiteral
|
||||
signatureHelpImportStarFromExportEquals
|
||||
signatureHelpOnOverloadOnConst
|
||||
stringLiteralCompletionsInPositionTypedUsingRest
|
||||
tripleSlashRefPathCompletionAbsolutePaths
|
||||
tripleSlashRefPathCompletionHiddenFile
|
||||
tsconfigComputedPropertyError
|
||||
tsxCompletion12
|
||||
typeErrorAfterStringCompletionsInNestedCall
|
||||
10
tools/tsgo/internal/fourslash/_scripts/tsconfig.json
Normal file
10
tools/tsgo/internal/fourslash/_scripts/tsconfig.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"module": "nodenext",
|
||||
"allowImportingTsExtensions": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"types": ["node"]
|
||||
}
|
||||
}
|
||||
2571
tools/tsgo/internal/fourslash/_scripts/unparsedTests.txt
Normal file
2571
tools/tsgo/internal/fourslash/_scripts/unparsedTests.txt
Normal file
File diff suppressed because it is too large
Load Diff
141
tools/tsgo/internal/fourslash/_scripts/updateFailing.mts
Normal file
141
tools/tsgo/internal/fourslash/_scripts/updateFailing.mts
Normal file
@@ -0,0 +1,141 @@
|
||||
#!/usr/bin/env -S node --experimental-strip-types --no-warnings
|
||||
|
||||
// Usage: node --experimental-strip-types --no-warnings updateFailing.mts
|
||||
|
||||
import * as cp from "child_process";
|
||||
import * as fs from "fs";
|
||||
import path from "path";
|
||||
import * as readline from "readline";
|
||||
import which from "which";
|
||||
|
||||
const failingTestsPath = path.join(import.meta.dirname, "failingTests.txt");
|
||||
const crashingTestsPath = path.join(import.meta.dirname, "crashingTests.txt");
|
||||
|
||||
interface TestEvent {
|
||||
Time?: string;
|
||||
Action: string;
|
||||
Package?: string;
|
||||
Test?: string;
|
||||
Output?: string;
|
||||
Elapsed?: number;
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const go = which.sync("go");
|
||||
|
||||
let testProcess: cp.ChildProcess;
|
||||
try {
|
||||
// Run tests with TSGO_FOURSLASH_IGNORE_FAILING=1 to run all tests including those in failingTests.txt
|
||||
testProcess = cp.spawn(go, ["test", "-json", "./internal/fourslash/tests/gen"], {
|
||||
stdio: ["ignore", "pipe", "pipe"],
|
||||
env: { ...process.env, TSGO_FOURSLASH_IGNORE_FAILING: "1" },
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
throw new Error("Failed to spawn test process: " + error);
|
||||
}
|
||||
|
||||
if (!testProcess.stdout || !testProcess.stderr) {
|
||||
throw new Error("Test process stdout or stderr is null");
|
||||
}
|
||||
|
||||
const failingTests: string[] = [];
|
||||
const crashingTests: string[] = [];
|
||||
const testOutputs = new Map<string, string[]>();
|
||||
const allOutputs: string[] = [];
|
||||
let hadPanic = false;
|
||||
|
||||
const rl = readline.createInterface({
|
||||
input: testProcess.stdout,
|
||||
crlfDelay: Infinity,
|
||||
});
|
||||
|
||||
rl.on("line", line => {
|
||||
try {
|
||||
const event: TestEvent = JSON.parse(line);
|
||||
|
||||
// Collect output for each test
|
||||
if (event.Action === "output" && event.Output) {
|
||||
allOutputs.push(event.Output);
|
||||
if (event.Test) {
|
||||
if (!testOutputs.has(event.Test)) {
|
||||
testOutputs.set(event.Test, []);
|
||||
}
|
||||
testOutputs.get(event.Test)!.push(event.Output);
|
||||
}
|
||||
|
||||
// Check for panics
|
||||
if (/^panic/m.test(event.Output)) {
|
||||
hadPanic = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Process failed tests
|
||||
if (event.Action === "fail" && event.Test) {
|
||||
const outputs = testOutputs.get(event.Test) || [];
|
||||
|
||||
// Check if this is a crashing test (contains InternalError)
|
||||
const hasCrash = outputs.some(line => line.includes("InternalError"));
|
||||
if (hasCrash) {
|
||||
crashingTests.push(event.Test);
|
||||
}
|
||||
|
||||
// A test is only considered a baseline-only failure if ALL error messages
|
||||
// are baseline-related. Any non-baseline error message means it's a real failure.
|
||||
const baselineMessagePatterns = [
|
||||
/^\s*baseline\.go:\d+: the baseline file .* has changed\./,
|
||||
/^\s*baseline\.go:\d+: new baseline created at /,
|
||||
/^\s*baseline\.go:\d+: the baseline file .* does not exist in the TypeScript submodule/,
|
||||
/^\s*baseline\.go:\d+: the baseline file .* does not match the reference in the TypeScript submodule/,
|
||||
];
|
||||
|
||||
// Check each output line that looks like an error message
|
||||
// Error messages from Go tests typically contain ".go:" with a line number
|
||||
const errorLines = outputs.filter(line => /^\s*\w+\.go:\d+:/.test(line));
|
||||
|
||||
// If there are no error lines, it's a real failure.
|
||||
// If all error lines match baseline patterns, it's a baseline-only failure
|
||||
const isBaselineOnlyFailure = errorLines.length > 0 &&
|
||||
errorLines.every(line => baselineMessagePatterns.some(pattern => pattern.test(line)));
|
||||
|
||||
if (!isBaselineOnlyFailure) {
|
||||
failingTests.push(event.Test);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
// Not JSON, possibly stderr or other output - ignore
|
||||
}
|
||||
});
|
||||
|
||||
testProcess.stderr.on("data", data => {
|
||||
// Check stderr for panics too
|
||||
const output = data.toString();
|
||||
allOutputs.push(output);
|
||||
if (/^panic/m.test(output)) {
|
||||
hadPanic = true;
|
||||
}
|
||||
});
|
||||
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
testProcess.on("close", code => {
|
||||
if (hadPanic) {
|
||||
reject(new Error("Unrecovered panic detected in tests\n" + allOutputs.join("")));
|
||||
return;
|
||||
}
|
||||
|
||||
fs.writeFileSync(failingTestsPath, failingTests.sort((a, b) => a.localeCompare(b, "en-US")).join("\n") + "\n", "utf-8");
|
||||
fs.writeFileSync(crashingTestsPath, crashingTests.sort((a, b) => a.localeCompare(b, "en-US")).join("\n") + "\n", "utf-8");
|
||||
resolve();
|
||||
});
|
||||
|
||||
testProcess.on("error", error => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
main().catch(error => {
|
||||
console.error("Error:", error);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user