package fourslash_test

import (
	"testing"

	"efprojects.com/kitten-ipc/kitcom/internal/tsgo/fourslash"
	"efprojects.com/kitten-ipc/kitcom/internal/tsgo/testutil"
)

func TestFindAllRefsObjectBindingElementPropertyName06(t *testing.T) {
	t.Parallel()

	defer testutil.RecoverAndFail(t, "Panic on fourslash test")
	const content = `interface I {
    /*0*/property1: number;
    property2: string;
}

var elems: I[];
for (let { /*1*/property1: p } of elems) {
}
for (let { /*2*/property1 } of elems) {
}
for (var { /*3*/property1: p1 } of elems) {
}
var p2;
for ({ /*4*/property1 : p2 } of elems) {
}`
	f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
	f.VerifyBaselineFindAllReferences(t, "0", "1", "3", "4", "2")
}
