Skip to content

Commit 80797b4

Browse files
committed
hmm
1 parent e43d14e commit 80797b4

34 files changed

+273
-64
lines changed

internal/fourslash/_scripts/failingTests.txt

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,7 @@ TestCodeCompletionEscaping
99
TestCommentsEnumsFourslash
1010
TestCommentsLinePreservation
1111
TestCommentsUnion
12-
TestCompletionAfterAtChar
13-
TestCompletionAfterBackslashFollowingString
14-
TestCompletionAfterBrace
15-
TestCompletionAfterDotDotDot
16-
TestCompletionAfterNewline
17-
TestCompletionAfterNewline2
1812
TestCompletionAfterQuestionDot
19-
TestCompletionAtCaseClause
2013
TestCompletionAutoInsertQuestionDot
2114
TestCompletionCloneQuestionToken
2215
TestCompletionEntryClassMembersWithInferredFunctionReturnType1
@@ -72,21 +65,16 @@ TestCompletionImportModuleSpecifierEndingTsxReact
7265
TestCompletionImportModuleSpecifierEndingUnsupportedExtension
7366
TestCompletionInChecks1
7467
TestCompletionInFunctionLikeBody_includesPrimitiveTypes
75-
TestCompletionInIncompleteCallExpression
7668
TestCompletionInJsDoc
7769
TestCompletionInNamedImportLocation
7870
TestCompletionInUncheckedJSFile
79-
TestCompletionListBuilderLocations_Modules
8071
TestCompletionListBuilderLocations_VariableDeclarations
81-
TestCompletionListDefaultTypeArgumentPositionTypeOnly
8272
TestCompletionListForDerivedType1
8373
TestCompletionListForTransitivelyExportedMembers04
8474
TestCompletionListFunctionExpression
8575
TestCompletionListInArrowFunctionInUnclosedCallSite01
8676
TestCompletionListInClassExpressionWithTypeParameter
8777
TestCompletionListInClassStaticBlocks
88-
TestCompletionListInComments3
89-
TestCompletionListInFunctionDeclaration
9078
TestCompletionListInImportClause01
9179
TestCompletionListInImportClause05
9280
TestCompletionListInImportClause06
@@ -97,7 +85,6 @@ TestCompletionListInNamedFunctionExpression1
9785
TestCompletionListInNamedFunctionExpressionWithShadowing
9886
TestCompletionListInScope
9987
TestCompletionListInTemplateLiteralParts1
100-
TestCompletionListInTypeParameterOfClassExpression1
10188
TestCompletionListInUnclosedCommaExpression01
10289
TestCompletionListInUnclosedCommaExpression02
10390
TestCompletionListInUnclosedFunction08
@@ -129,14 +116,8 @@ TestCompletionOfAwaitPromise6
129116
TestCompletionOfAwaitPromise7
130117
TestCompletionOfInterfaceAndVar
131118
TestCompletionPreferredSuggestions1
132-
TestCompletionPropertyShorthandForObjectLiteral2
133-
TestCompletionPropertyShorthandForObjectLiteral3
134-
TestCompletionPropertyShorthandForObjectLiteral4
135-
TestCompletionTypeAssertion
136-
TestCompletionTypeGuard
137119
TestCompletionWithConditionalOperatorMissingColon
138120
TestCompletionsAfterJSDoc
139-
TestCompletionsAtGenericTypeArguments
140121
TestCompletionsBeforeRestArg1
141122
TestCompletionsElementAccessNumeric
142123
TestCompletionsExportImport
@@ -149,8 +130,6 @@ TestCompletionsJSDocImportTagAttributesEmptyModuleSpecifier1
149130
TestCompletionsJSDocImportTagAttributesErrorModuleSpecifier1
150131
TestCompletionsJSDocImportTagEmptyModuleSpecifier1
151132
TestCompletionsJSDocNoCrash1
152-
TestCompletionsJSDocNoCrash2
153-
TestCompletionsJsdocParamTypeBeforeName
154133
TestCompletionsJsdocTypeTagCast
155134
TestCompletionsJsxAttributeInitializer2
156135
TestCompletionsLiteralFromInferenceWithinInferredType3
@@ -177,14 +156,11 @@ TestCompletionsPaths_pathMapping_nonTrailingWildcard1
177156
TestCompletionsPaths_pathMapping_parentDirectory
178157
TestCompletionsRecommended_union
179158
TestCompletionsRedeclareModuleAsGlobal
180-
TestCompletionsSelfDeclaring2
181159
TestCompletionsStringsWithTriggerCharacter
182160
TestCompletionsSymbolMembers
183161
TestCompletionsTriggerCharacter
184162
TestCompletionsTuple
185-
TestCompletionsTypeAssertionKeywords
186163
TestCompletionsUniqueSymbol1
187-
TestCompletionsWritingSpreadArgument
188164
TestConstEnumQuickInfoAndCompletionList
189165
TestConstQuickInfoAndCompletionList
190166
TestContextuallyTypedFunctionExpressionGeneric1
@@ -259,7 +235,6 @@ TestJsDocFunctionSignatures12
259235
TestJsDocFunctionSignatures13
260236
TestJsDocFunctionSignatures7
261237
TestJsDocFunctionSignatures8
262-
TestJsDocFunctionTypeCompletionsNoCrash
263238
TestJsDocGenerics2
264239
TestJsDocInheritDoc
265240
TestJsDocPropertyDescription1
@@ -278,15 +253,10 @@ TestJsDocTagsWithHyphen
278253
TestJsQuickInfoGenerallyAcceptableSize
279254
TestJsRequireQuickInfo
280255
TestJsdocCallbackTag
281-
TestJsdocExtendsTagCompletion
282-
TestJsdocImplementsTagCompletion
283256
TestJsdocLink2
284257
TestJsdocLink3
285258
TestJsdocLink6
286-
TestJsdocPropertyTagCompletion
287-
TestJsdocSatisfiesTagCompletion1
288259
TestJsdocTemplatePrototypeCompletions
289-
TestJsdocTemplateTagCompletion
290260
TestJsdocThrowsTagCompletion
291261
TestJsdocTypedefTag
292262
TestJsdocTypedefTag2
@@ -303,7 +273,6 @@ TestNgProxy1
303273
TestNoQuickInfoForLabel
304274
TestNoQuickInfoInWhitespace
305275
TestNodeModulesImportCompletions1
306-
TestNonExistingImport
307276
TestNumericPropertyNames
308277
TestOverloadQuickInfo
309278
TestParameterWithDestructuring

internal/fourslash/fourslash.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,26 @@ func (f *FourslashTest) verifyCompletionsItems(t *testing.T, prefix string, actu
625625
t.Fatal(prefix + "Expected exact completion list but also specified 'unsorted'.")
626626
}
627627
if len(actual) != len(expected.Exact) {
628+
actualNames := core.Map(actual, func(item *lsproto.CompletionItem) string {
629+
return item.Label
630+
})
631+
632+
expectedNames := core.Map(expected.Exact, func(item CompletionsExpectedItem) string {
633+
return getExpectedLabel(t, item)
634+
})
635+
636+
for _, name := range actualNames {
637+
if !slices.Contains(expectedNames, name) {
638+
t.Logf("%sUnexpected completion item: %s", prefix, name)
639+
}
640+
}
641+
642+
for _, name := range expectedNames {
643+
if !slices.Contains(actualNames, name) {
644+
t.Logf("%sMissing expected completion item: %s", prefix, name)
645+
}
646+
}
647+
628648
t.Fatalf(prefix+"Expected %d exact completion items but got %d: %s", len(expected.Exact), len(actual), cmp.Diff(actual, expected.Exact))
629649
}
630650
if len(actual) > 0 {

internal/fourslash/tests/gen/completionAfterAtChar_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
func TestCompletionAfterAtChar(t *testing.T) {
1212
t.Parallel()
13-
t.Skip()
13+
1414
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1515
const content = `@a/**/`
1616
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)

internal/fourslash/tests/gen/completionAfterBackslashFollowingString_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
func TestCompletionAfterBackslashFollowingString(t *testing.T) {
1212
t.Parallel()
13-
t.Skip()
13+
1414
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1515
const content = `Harness.newLine = ""\n/**/`
1616
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)

internal/fourslash/tests/gen/completionAfterBrace_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
func TestCompletionAfterBrace(t *testing.T) {
1212
t.Parallel()
13-
t.Skip()
13+
1414
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1515
const content = `
1616
}/**/

internal/fourslash/tests/gen/completionAfterDotDotDot_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
func TestCompletionAfterDotDotDot(t *testing.T) {
1212
t.Parallel()
13-
t.Skip()
13+
1414
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1515
const content = `.../**/`
1616
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)

internal/fourslash/tests/gen/completionAfterNewline2_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
func TestCompletionAfterNewline2(t *testing.T) {
1313
t.Parallel()
14-
t.Skip()
14+
1515
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1616
const content = `let foo = 5 as const /*1*/
1717
/*2*/`

internal/fourslash/tests/gen/completionAfterNewline_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
func TestCompletionAfterNewline(t *testing.T) {
1313
t.Parallel()
14-
t.Skip()
14+
1515
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1616
const content = `let foo /*1*/
1717
/*2*/

internal/fourslash/tests/gen/completionAtCaseClause_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
func TestCompletionAtCaseClause(t *testing.T) {
1212
t.Parallel()
13-
t.Skip()
13+
1414
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1515
const content = `case /**/`
1616
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)

internal/fourslash/tests/gen/completionInIncompleteCallExpression_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
func TestCompletionInIncompleteCallExpression(t *testing.T) {
1212
t.Parallel()
13-
t.Skip()
13+
1414
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
1515
const content = `var array = [1, 2, 4]
1616
function a4(x, y, z) { }

0 commit comments

Comments
 (0)