Skip to content

Commit 0874642

Browse files
authored
Support auto-import completion fourslash tests, fix bugs (#1917)
1 parent 58d4391 commit 0874642

File tree

153 files changed

+9715
-490
lines changed

Some content is hidden

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

153 files changed

+9715
-490
lines changed

internal/fourslash/_scripts/convertFourslash.mts

Lines changed: 298 additions & 12 deletions
Large diffs are not rendered by default.

internal/fourslash/_scripts/failingTests.txt

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,29 @@ TestAmbientShorthandGotoDefinition
33
TestArgumentsAreAvailableAfterEditsAtEndOfFunction
44
TestAugmentedTypesClass1
55
TestAugmentedTypesClass3Fourslash
6+
TestAutoImportCompletionAmbientMergedModule1
7+
TestAutoImportCompletionExportEqualsWithDefault1
8+
TestAutoImportCompletionExportListAugmentation1
9+
TestAutoImportCompletionExportListAugmentation2
10+
TestAutoImportCompletionExportListAugmentation3
11+
TestAutoImportCompletionExportListAugmentation4
12+
TestAutoImportFileExcludePatterns3
13+
TestAutoImportPathsAliasesAndBarrels
14+
TestAutoImportProvider_exportMap1
15+
TestAutoImportProvider_exportMap2
16+
TestAutoImportProvider_exportMap3
17+
TestAutoImportProvider_exportMap4
18+
TestAutoImportProvider_exportMap5
19+
TestAutoImportProvider_exportMap6
20+
TestAutoImportProvider_exportMap7
21+
TestAutoImportProvider_exportMap8
22+
TestAutoImportProvider_exportMap9
23+
TestAutoImportProvider_globalTypingsCache
24+
TestAutoImportProvider_namespaceSameNameAsIntrinsic
25+
TestAutoImportProvider_wildcardExports1
26+
TestAutoImportProvider_wildcardExports2
27+
TestAutoImportProvider_wildcardExports3
28+
TestAutoImportVerbatimTypeOnly1
629
TestBestCommonTypeObjectLiterals
730
TestBestCommonTypeObjectLiterals1
831
TestCodeCompletionEscaping
@@ -20,6 +43,7 @@ TestCompletionEntryForUnionProperty
2043
TestCompletionEntryForUnionProperty2
2144
TestCompletionForComputedStringProperties
2245
TestCompletionForMetaProperty
46+
TestCompletionForObjectProperty
2347
TestCompletionForStringLiteral
2448
TestCompletionForStringLiteral4
2549
TestCompletionForStringLiteralExport
@@ -65,7 +89,6 @@ TestCompletionImportModuleSpecifierEndingUnsupportedExtension
6589
TestCompletionInChecks1
6690
TestCompletionInFunctionLikeBody_includesPrimitiveTypes
6791
TestCompletionInJsDoc
68-
TestCompletionInNamedImportLocation
6992
TestCompletionInUncheckedJSFile
7093
TestCompletionListBuilderLocations_VariableDeclarations
7194
TestCompletionListForDerivedType1
@@ -115,13 +138,51 @@ TestCompletionOfAwaitPromise6
115138
TestCompletionOfAwaitPromise7
116139
TestCompletionOfInterfaceAndVar
117140
TestCompletionPreferredSuggestions1
141+
TestCompletionPropertyShorthandForObjectLiteral5
118142
TestCompletionWithConditionalOperatorMissingColon
119143
TestCompletionsAfterJSDoc
120144
TestCompletionsBeforeRestArg1
145+
TestCompletionsClassMemberImportTypeNodeParameter1
146+
TestCompletionsClassMemberImportTypeNodeParameter2
147+
TestCompletionsClassMemberImportTypeNodeParameter3
148+
TestCompletionsClassMemberImportTypeNodeParameter4
121149
TestCompletionsElementAccessNumeric
122150
TestCompletionsExportImport
123151
TestCompletionsGenericTypeWithMultipleBases1
152+
TestCompletionsImportBaseUrl
124153
TestCompletionsImportOrExportSpecifier
154+
TestCompletionsImport_default_alreadyExistedWithRename
155+
TestCompletionsImport_default_anonymous
156+
TestCompletionsImport_default_didNotExistBefore
157+
TestCompletionsImport_default_exportDefaultIdentifier
158+
TestCompletionsImport_details_withMisspelledName
159+
TestCompletionsImport_exportEquals_anonymous
160+
TestCompletionsImport_exportEquals_global
161+
TestCompletionsImport_filteredByInvalidPackageJson_direct
162+
TestCompletionsImport_filteredByPackageJson_direct
163+
TestCompletionsImport_filteredByPackageJson_nested
164+
TestCompletionsImport_filteredByPackageJson_peerDependencies
165+
TestCompletionsImport_filteredByPackageJson_typesImplicit
166+
TestCompletionsImport_filteredByPackageJson_typesOnly
167+
TestCompletionsImport_importType
168+
TestCompletionsImport_jsxOpeningTagImportDefault
169+
TestCompletionsImport_mergedReExport
170+
TestCompletionsImport_multipleWithSameName
171+
TestCompletionsImport_named_didNotExistBefore
172+
TestCompletionsImport_named_exportEqualsNamespace
173+
TestCompletionsImport_named_namespaceImportExists
174+
TestCompletionsImport_noSemicolons
175+
TestCompletionsImport_ofAlias_preferShortPath
176+
TestCompletionsImport_packageJsonImportsPreference
177+
TestCompletionsImport_quoteStyle
178+
TestCompletionsImport_reExportDefault
179+
TestCompletionsImport_reExportDefault2
180+
TestCompletionsImport_reExport_wrongName
181+
TestCompletionsImport_require_addToExisting
182+
TestCompletionsImport_typeOnly
183+
TestCompletionsImport_umdDefaultNoCrash1
184+
TestCompletionsImport_uriStyleNodeCoreModules2
185+
TestCompletionsImport_windowsPathsProjectRelative
125186
TestCompletionsInExport
126187
TestCompletionsInExport_moduleBlock
127188
TestCompletionsInRequire
@@ -153,13 +214,16 @@ TestCompletionsPaths_kinds
153214
TestCompletionsPaths_pathMapping
154215
TestCompletionsPaths_pathMapping_nonTrailingWildcard1
155216
TestCompletionsPaths_pathMapping_parentDirectory
217+
TestCompletionsRecommended_namespace
156218
TestCompletionsRecommended_union
157219
TestCompletionsRedeclareModuleAsGlobal
158220
TestCompletionsStringsWithTriggerCharacter
159221
TestCompletionsSymbolMembers
160222
TestCompletionsTriggerCharacter
161223
TestCompletionsTuple
162224
TestCompletionsUniqueSymbol1
225+
TestCompletionsUniqueSymbol_import
226+
TestCompletionsWithDeprecatedTag10
163227
TestConstEnumQuickInfoAndCompletionList
164228
TestConstQuickInfoAndCompletionList
165229
TestContextuallyTypedFunctionExpressionGeneric1
@@ -215,6 +279,16 @@ TestImportCompletions_importsMap2
215279
TestImportCompletions_importsMap3
216280
TestImportCompletions_importsMap4
217281
TestImportCompletions_importsMap5
282+
TestImportNameCodeFixExportAsDefault
283+
TestImportSuggestionsCache_exportUndefined
284+
TestImportTypeCompletions1
285+
TestImportTypeCompletions3
286+
TestImportTypeCompletions4
287+
TestImportTypeCompletions5
288+
TestImportTypeCompletions6
289+
TestImportTypeCompletions7
290+
TestImportTypeCompletions8
291+
TestImportTypeCompletions9
218292
TestIndexerReturnTypes1
219293
TestIndirectClassInstantiation
220294
TestInstanceTypesForGenericType1
@@ -245,6 +319,7 @@ TestJsDocPropertyDescription8
245319
TestJsDocPropertyDescription9
246320
TestJsDocServices
247321
TestJsDocTagsWithHyphen
322+
TestJsFileImportNoTypes2
248323
TestJsQuickInfoGenerallyAcceptableSize
249324
TestJsRequireQuickInfo
250325
TestJsdocCallbackTag
@@ -386,7 +461,6 @@ TestQuickInfoOnGenericWithConstraints1
386461
TestQuickInfoOnInternalAliases
387462
TestQuickInfoOnJsxNamespacedNameWithDoc1
388463
TestQuickInfoOnMethodOfImportEquals
389-
TestQuickInfoOnNarrowedType
390464
TestQuickInfoOnNarrowedTypeInModule
391465
TestQuickInfoOnNewKeyword01
392466
TestQuickInfoOnObjectLiteralWithAccessors

0 commit comments

Comments
 (0)