kittenipc/kitcom/internal/tsgo/fourslash/tests/gen/quickInfoJSDocBackticks_test.go
2025-10-15 10:12:44 +03:00

37 lines
1.1 KiB
Go

package fourslash_test
import (
"testing"
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/fourslash"
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/testutil"
)
func TestQuickInfoJSDocBackticks(t *testing.T) {
t.Parallel()
t.Skip()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @noEmit: true
// @allowJs: true
// @checkJs: true
// @strict: true
// @Filename: jsdocParseMatchingBackticks.js
/**
* ` + "`" + `@param` + "`" + ` initial at-param is OK in title comment
* @param {string} x hi there ` + "`" + `@param` + "`" + `
* @param {string} y hi there ` + "`" + `@ * param
* this is the margin
*/
export function f(x, y) {
return x/*x*/ + y/*y*/
}
f/*f*/`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.GoToMarker(t, "f")
f.VerifyQuickInfoIs(t, "function f(x: string, y: string): string", "`@param` initial at-param is OK in title comment")
f.GoToMarker(t, "x")
f.VerifyQuickInfoIs(t, "(parameter) x: string", "hi there `@param`")
f.GoToMarker(t, "y")
f.VerifyQuickInfoIs(t, "(parameter) y: string", "hi there `@ * param\nthis is the margin")
}