Files
tsgo/internal/fourslash/tests/inlayHintsReparsedNodeCrash_test.go
be911e2565 Add regression test for inlay hints crash on reparsed nodes (#2460) (#2908)
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: DanielRosenwasser <[email protected]>
Co-authored-by: Daniel Rosenwasser <[email protected]>
Co-authored-by: Ryan Cavanaugh <[email protected]>
2026-08-14 22:48:26 +00:00

33 lines
837 B
Go

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/ls/lsutil"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestInlayHintsReparsedNodeCrash(t *testing.T) {
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `
// @allowJs: true
// @checkJs: true
// @Filename: /a.js
module.exports = function () {
return 1;
};
`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{
IncludeInlayFunctionLikeReturnTypeHints: core.TSTrue,
IncludeInlayFunctionParameterTypeHints: core.TSTrue,
}})
}