vendor tsgo
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package fourslash_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/microsoft/typescript-go/internal/fourslash"
|
||||
"github.com/microsoft/typescript-go/internal/testutil"
|
||||
)
|
||||
|
||||
func TestAutoImportNewLine(t *testing.T) {
|
||||
t.Parallel()
|
||||
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
||||
const content = `// @Filename: /a.ts
|
||||
export function readFileSync() {}
|
||||
|
||||
// @Filename: /b.ts
|
||||
import {} from "./other1";
|
||||
import {} from "./other2";
|
||||
|
||||
|
||||
readFileSync/**/`
|
||||
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
||||
defer done()
|
||||
f.BaselineAutoImportsCompletions(t, []string{""})
|
||||
}
|
||||
|
||||
func TestAutoImportNewLineWithHeaderComment(t *testing.T) {
|
||||
t.Parallel()
|
||||
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
||||
const content = `// @Filename: /a.ts
|
||||
export function readFileSync() {}
|
||||
|
||||
// @Filename: /b.ts
|
||||
/* file header comment */
|
||||
import {} from "./other1";
|
||||
import {} from "./other2";
|
||||
|
||||
|
||||
readFileSync/**/`
|
||||
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
||||
defer done()
|
||||
f.BaselineAutoImportsCompletions(t, []string{""})
|
||||
}
|
||||
Reference in New Issue
Block a user