mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
41 lines
1.0 KiB
Go
41 lines
1.0 KiB
Go
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestFormatInterfaceWithMissingBraceAndLaterTemplateString2(t *testing.T) {
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `
|
|
// @Filename: /FormCheck.tsx
|
|
interface FormCheckProps {
|
|
|
|
const FormCheck: DynamicRefForwardingComponent<'input', FormCheckProps> =
|
|
React.forwardRef(
|
|
() => {
|
|
return <div className={` + "`" + `${bsPrefix}-reverse` + "`" + `} />;
|
|
},
|
|
);
|
|
|
|
FormCheck.displayName = 'FormCheck';
|
|
`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.FormatDocument(t, "")
|
|
f.VerifyCurrentFileContent(t, `interface FormCheckProps {
|
|
|
|
const FormCheck: DynamicRefForwardingComponent<'input', FormCheckProps> =
|
|
React.forwardRef(
|
|
() => {
|
|
return <div className={`+"`"+`${bsPrefix}-reverse`+"`"+`} />;
|
|
},
|
|
);
|
|
|
|
FormCheck.displayName = 'FormCheck';
|
|
`)
|
|
}
|