24 lines
592 B
Go
24 lines
592 B
Go
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/fourslash"
|
|
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/testutil"
|
|
)
|
|
|
|
func TestFindAllRefsDestructureGetter(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `class Test {
|
|
get /*x0*/x() { return 0; }
|
|
|
|
set /*y0*/y(a: number) {}
|
|
}
|
|
const { /*x1*/x, /*y1*/y } = new Test();
|
|
/*x2*/x; /*y2*/y;`
|
|
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
f.VerifyBaselineFindAllReferences(t, "x0", "x1", "x2", "y0", "y1", "y2")
|
|
}
|