kittenipc/kitcom/internal/tsgo/fourslash/tests/gen/completionsOverridingMethod4_test.go
2025-10-15 10:12:44 +03:00

70 lines
1.7 KiB
Go

package fourslash_test
import (
"testing"
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/fourslash"
. "efprojects.com/kitten-ipc/kitcom/internal/tsgo/fourslash/tests/util"
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/ls"
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/lsp/lsproto"
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/testutil"
)
func TestCompletionsOverridingMethod4(t *testing.T) {
t.Parallel()
t.Skip()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @newline: LF
// @Filename: secret.ts
class Secret {
#secret(): string {
return "secret";
}
private tell(): string {
return this.#secret();
}
protected hint(): string {
return "hint";
}
public refuse(): string {
return "no comments";
}
}
class Gossip extends Secret {
/* no telling secrets */
/*a*/
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyCompletions(t, "a", &fourslash.CompletionsExpectedList{
IsIncomplete: false,
ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
CommitCharacters: &[]string{},
EditRange: Ignored,
},
Items: &fourslash.CompletionsExpectedItems{
Includes: []fourslash.CompletionsExpectedItem{
&lsproto.CompletionItem{
Label: "hint",
InsertText: PtrTo("protected hint(): string {\n}"),
FilterText: PtrTo("hint"),
SortText: PtrTo(string(ls.SortTextLocationPriority)),
},
&lsproto.CompletionItem{
Label: "refuse",
InsertText: PtrTo("public refuse(): string {\n}"),
FilterText: PtrTo("refuse"),
SortText: PtrTo(string(ls.SortTextLocationPriority)),
},
},
Excludes: []string{
"tell",
"#secret",
},
},
})
}