28 lines
727 B
Go
28 lines
727 B
Go
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/fourslash"
|
|
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/testutil"
|
|
)
|
|
|
|
func TestJavaScriptClass2(t *testing.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 := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "union")
|
|
}
|