mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
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]>
33 lines
837 B
Go
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,
|
|
}})
|
|
}
|