62 lines
1.7 KiB
Go
62 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/testutil"
|
|
)
|
|
|
|
func TestTsxCompletion14(t *testing.T) {
|
|
t.Parallel()
|
|
t.Skip()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `//@module: commonjs
|
|
//@jsx: preserve
|
|
declare module JSX {
|
|
interface Element { }
|
|
interface IntrinsicElements {
|
|
}
|
|
interface ElementAttributesProperty { props; }
|
|
}
|
|
//@Filename: exporter.tsx
|
|
export class Thing { props: { ONE: string; TWO: number } }
|
|
export module M {
|
|
export declare function SFCComp(props: { Three: number; Four: string }): JSX.Element;
|
|
}
|
|
//@Filename: file.tsx
|
|
import * as Exp from './exporter';
|
|
var x1 = <Exp.Thing /*1*/ />;
|
|
var x2 = <Exp.M.SFCComp /*2*/ />;
|
|
var x3 = <Exp.Thing /*3*/ ></Exp.Thing>;
|
|
var x4 = <Exp.M.SFCComp /*4*/ ></Exp.M.SFCComp>;`
|
|
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
f.VerifyCompletions(t, []string{"1", "3"}, &fourslash.CompletionsExpectedList{
|
|
IsIncomplete: false,
|
|
ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
|
|
CommitCharacters: &DefaultCommitCharacters,
|
|
EditRange: Ignored,
|
|
},
|
|
Items: &fourslash.CompletionsExpectedItems{
|
|
Exact: []fourslash.CompletionsExpectedItem{
|
|
"ONE",
|
|
"TWO",
|
|
},
|
|
},
|
|
})
|
|
f.VerifyCompletions(t, []string{"2", "4"}, &fourslash.CompletionsExpectedList{
|
|
IsIncomplete: false,
|
|
ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
|
|
CommitCharacters: &DefaultCommitCharacters,
|
|
EditRange: Ignored,
|
|
},
|
|
Items: &fourslash.CompletionsExpectedItems{
|
|
Exact: []fourslash.CompletionsExpectedItem{
|
|
"Four",
|
|
"Three",
|
|
},
|
|
},
|
|
})
|
|
}
|