vendor tsgo
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
// Code generated by convertFourslash; DO NOT EDIT.
|
||||
// To modify this test, run "npm run makemanual protoPropertyInObjectLiteral"
|
||||
|
||||
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/lsp/lsproto"
|
||||
"github.com/microsoft/typescript-go/internal/testutil"
|
||||
)
|
||||
|
||||
func TestProtoPropertyInObjectLiteral(t *testing.T) {
|
||||
fourslash.SkipIfFailing(t)
|
||||
t.Parallel()
|
||||
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
||||
const content = `var o1 = {
|
||||
"__proto__": 10
|
||||
};
|
||||
var o2 = {
|
||||
__proto__: 10
|
||||
};
|
||||
o1./*1*/
|
||||
o2./*2*/`
|
||||
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{
|
||||
Exact: []fourslash.CompletionsExpectedItem{
|
||||
&lsproto.CompletionItem{
|
||||
Label: "__proto__",
|
||||
Detail: new("(property) \"__proto__\": number"),
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
f.Insert(t, "__proto__ = 10;")
|
||||
f.VerifyQuickInfoAt(t, "1", "(property) \"__proto__\": number", "")
|
||||
f.VerifyCompletions(t, "2", &fourslash.CompletionsExpectedList{
|
||||
IsIncomplete: false,
|
||||
ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
|
||||
CommitCharacters: &DefaultCommitCharacters,
|
||||
EditRange: Ignored,
|
||||
},
|
||||
Items: &fourslash.CompletionsExpectedItems{
|
||||
Exact: []fourslash.CompletionsExpectedItem{
|
||||
&lsproto.CompletionItem{
|
||||
Label: "__proto__",
|
||||
Detail: new("(property) __proto__: number"),
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
f.Insert(t, "__proto__ = 10;")
|
||||
f.VerifyQuickInfoAt(t, "2", "(property) __proto__: number", "")
|
||||
}
|
||||
Reference in New Issue
Block a user