Files
kjol/tools/tsgo/internal/fourslash/tests/gen/javaScriptClass2_test.go
2026-07-09 16:50:43 -04:00

32 lines
887 B
Go

// Code generated by convertFourslash; DO NOT EDIT.
// To modify this test, run "npm run makemanual javaScriptClass2"
package fourslash_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestJavaScriptClass2(t *testing.T) {
fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @allowNonTsExtensions: true
// @Filename: Foo.js
class Foo {
constructor() {
[|this.[|{| "contextRangeIndex": 0 |}union|] = 'foo';|]
[|this.[|{| "contextRangeIndex": 2 |}union|] = 100;|]
}
method() { return this.[|union|]; }
}
var x = new Foo();
x.[|union|];`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "union")
}