52 lines
1.2 KiB
Go
52 lines
1.2 KiB
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual completionsPrivateProperties_Js"
|
|
|
|
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/testutil"
|
|
)
|
|
|
|
func TestCompletionsPrivateProperties_Js(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `// @allowJs: true
|
|
// @Filename: a.d.ts
|
|
declare namespace A {
|
|
class Foo {
|
|
constructor();
|
|
|
|
private m1(): void;
|
|
protected m2(): void;
|
|
|
|
m3(): void;
|
|
}
|
|
}
|
|
// @filename: b.js
|
|
let foo = new A.Foo();
|
|
foo./**/`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.VerifyCompletions(t, []string{""}, &fourslash.CompletionsExpectedList{
|
|
IsIncomplete: false,
|
|
ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
|
|
CommitCharacters: &DefaultCommitCharacters,
|
|
EditRange: Ignored,
|
|
},
|
|
Items: &fourslash.CompletionsExpectedItems{
|
|
Includes: []fourslash.CompletionsExpectedItem{
|
|
"m3",
|
|
},
|
|
Excludes: []string{
|
|
"m1",
|
|
"m2",
|
|
},
|
|
},
|
|
})
|
|
}
|