28 lines
945 B
Go
28 lines
945 B
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual goToDefinitionShorthandProperty01"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestGoToDefinitionShorthandProperty01(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `// @lib: es5
|
|
var /*valueDeclaration1*/name = "hello";
|
|
var /*valueDeclaration2*/id = 100000;
|
|
declare var /*valueDeclaration3*/id;
|
|
var obj = {[|/*valueDefinition1*/name|], [|/*valueDefinition2*/id|]};
|
|
obj.[|/*valueReference1*/name|];
|
|
obj.[|/*valueReference2*/id|];`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.VerifyBaselineGoToDefinition(t, true, "valueDefinition1", "valueDefinition2", "valueReference1", "valueReference2")
|
|
}
|