Files
kjol/tools/tsgo/internal/fourslash/tests/gen/docCommentTemplateVariableStatements03_test.go
2026-07-09 16:50:43 -04:00

78 lines
1.5 KiB
Go

// Code generated by convertFourslash; DO NOT EDIT.
// To modify this test, run "npm run makemanual docCommentTemplateVariableStatements03"
package fourslash_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestDocCommentTemplateVariableStatements03(t *testing.T) {
fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `/*a*/
var a = x => x
/*b*/
let b = (x,y,z) => x + y + z;
/*c*/
const c = ((x => +x))
/*d*/
let d = (function () { })
/*e*/
let e = function e([a,b,c]) {
return "hello"
};
/*f*/
let f = class {
}
/*g*/
const g = ((class G {
constructor(private x);
constructor(x,y,z);
constructor(x,y,z, ...okayThatsEnough) {
}
}))`
capabilities := fourslash.GetDefaultCapabilities()
capabilities.TextDocument.Completion.CompletionItem.SnippetSupport = new(false)
f, done := fourslash.NewFourslash(t, capabilities, content)
defer done()
f.VerifyJSDocCompletion(t, "a", 7, `/**
*
* @param x
* @returns
*/`, nil)
f.VerifyJSDocCompletion(t, "b", 7, `/**
*
* @param x
* @param y
* @param z
* @returns
*/`, nil)
f.VerifyJSDocCompletion(t, "c", 7, `/**
*
* @param x
* @returns
*/`, nil)
f.VerifyJSDocCompletion(t, "d", 3, `/** */`, nil)
f.VerifyJSDocCompletion(t, "e", 7, `/**
*
* @param param0
* @returns
*/`, nil)
f.VerifyJSDocCompletion(t, "f", 3, `/** */`, nil)
f.VerifyJSDocCompletion(t, "g", 7, `/**
*
* @param x
*/`, nil)
}