kittenipc/kitcom/internal/tsgo/fourslash/tests/gen/findAllRefsInsideWithBlock_test.go
2025-10-15 10:12:44 +03:00

25 lines
613 B
Go

package fourslash_test
import (
"testing"
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/fourslash"
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/testutil"
)
func TestFindAllRefsInsideWithBlock(t *testing.T) {
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `/*1*/var /*2*/x = 0;
with ({}) {
var y = x; // Reference of x here should not be picked
y++; // also reference for y should be ignored
}
/*3*/x = /*4*/x + 1;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineFindAllReferences(t, "1", "2", "3", "4")
}