mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
53 lines
1.5 KiB
Go
53 lines
1.5 KiB
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual completionListInImportClause04"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
. "github.com/microsoft/typescript-go/internal/fourslash/tests/util"
|
|
"github.com/microsoft/typescript-go/internal/ls"
|
|
"github.com/microsoft/typescript-go/internal/lsp/lsproto"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestCompletionListInImportClause04(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `// @Filename: foo.d.ts
|
|
declare class Foo {
|
|
static prop1(x: number): number;
|
|
static prop1(x: string): string;
|
|
static prop2(x: boolean): boolean;
|
|
}
|
|
export = Foo; /*2*/
|
|
// @Filename: app.ts
|
|
import {/*1*/} from './foo';`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.VerifyCompletions(t, "1", &fourslash.CompletionsExpectedList{
|
|
IsIncomplete: false,
|
|
ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
|
|
CommitCharacters: &DefaultCommitCharacters,
|
|
EditRange: Ignored,
|
|
},
|
|
Items: &fourslash.CompletionsExpectedItems{
|
|
Unsorted: []fourslash.CompletionsExpectedItem{
|
|
"prototype",
|
|
"prop1",
|
|
"prop2",
|
|
&lsproto.CompletionItem{
|
|
Label: "type",
|
|
SortText: new(string(ls.SortTextGlobalsOrKeywords)),
|
|
},
|
|
},
|
|
},
|
|
})
|
|
f.VerifyNoErrors(t)
|
|
f.GoToMarker(t, "2")
|
|
f.VerifyNoErrors(t)
|
|
}
|