38 lines
1017 B
Go
38 lines
1017 B
Go
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/lsp/lsproto"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestSignatureHelpIteratorNextVS(t *testing.T) {
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `// @lib: esnext
|
|
declare const iterator: Iterator<string, void, number>;
|
|
|
|
iterator.next(/*1*/);
|
|
iterator.next(/*2*/ 0);
|
|
|
|
declare const generator: Generator<string, void, number>;
|
|
|
|
generator.next(/*3*/);
|
|
generator.next(/*4*/ 0);
|
|
|
|
declare const asyncIterator: AsyncIterator<string, void, number>;
|
|
|
|
asyncIterator.next(/*5*/);
|
|
asyncIterator.next(/*6*/ 0);
|
|
|
|
declare const asyncGenerator: AsyncGenerator<string, void, number>;
|
|
|
|
asyncGenerator.next(/*7*/);
|
|
asyncGenerator.next(/*8*/ 0);`
|
|
f, done := fourslash.NewFourslash(t, &lsproto.ClientCapabilities{VSSupportsVisualStudioExtensions: new(true)}, content)
|
|
defer done()
|
|
f.VerifyBaselineSignatureHelp(t)
|
|
}
|