vendor tsgo
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
// Code generated by convertFourslash; DO NOT EDIT.
|
||||
// To modify this test, run "npm run makemanual formatIfTryCatchBlocks"
|
||||
|
||||
package fourslash_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/microsoft/typescript-go/internal/core"
|
||||
"github.com/microsoft/typescript-go/internal/fourslash"
|
||||
"github.com/microsoft/typescript-go/internal/testutil"
|
||||
)
|
||||
|
||||
func TestFormatIfTryCatchBlocks(t *testing.T) {
|
||||
fourslash.SkipIfFailing(t)
|
||||
t.Parallel()
|
||||
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
||||
const content = `try {
|
||||
}
|
||||
catch {
|
||||
}
|
||||
|
||||
try {
|
||||
}
|
||||
catch (e) {
|
||||
}`
|
||||
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
||||
defer done()
|
||||
opts187 := f.GetOptions()
|
||||
opts187.FormatCodeSettings.PlaceOpenBraceOnNewLineForControlBlocks = core.TSTrue
|
||||
f.Configure(t, opts187)
|
||||
f.FormatDocument(t, "")
|
||||
f.VerifyCurrentFileContent(t, `try
|
||||
{
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
}`)
|
||||
}
|
||||
Reference in New Issue
Block a user