58 lines
1.3 KiB
Go
58 lines
1.3 KiB
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual docCommentTemplateClassDeclMethods01"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestDocCommentTemplateClassDeclMethods01(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `class C {
|
|
/*0*/ /*1*/
|
|
foo();
|
|
/*2*/foo(a);
|
|
/*3*/foo(a, b);
|
|
/*4*/foo(a, {x: string}, [c]);
|
|
/*5*/foo(a?, b?, ...args) {
|
|
}
|
|
}`
|
|
capabilities := fourslash.GetDefaultCapabilities()
|
|
capabilities.TextDocument.Completion.CompletionItem.SnippetSupport = new(false)
|
|
f, done := fourslash.NewFourslash(t, capabilities, content)
|
|
defer done()
|
|
f.VerifyJSDocCompletion(t, "0", 3, `/** */`, nil)
|
|
f.VerifyJSDocCompletion(t, "1", 3, `/** */`, nil)
|
|
f.VerifyJSDocCompletion(t, "2", 11, `/**
|
|
*
|
|
* @param a
|
|
*/
|
|
`, nil)
|
|
f.VerifyJSDocCompletion(t, "3", 11, `/**
|
|
*
|
|
* @param a
|
|
* @param b
|
|
*/
|
|
`, nil)
|
|
f.VerifyJSDocCompletion(t, "4", 11, `/**
|
|
*
|
|
* @param a
|
|
* @param param1
|
|
* @param param2
|
|
*/
|
|
`, nil)
|
|
f.VerifyJSDocCompletion(t, "5", 11, `/**
|
|
*
|
|
* @param a
|
|
* @param b
|
|
* @param args
|
|
*/
|
|
`, nil)
|
|
}
|