Files
tsgo/internal/fourslash/tests/gen/importNameCodeFixExportAsDefault_test.go

34 lines
950 B
Go

// Code generated by convertFourslash; DO NOT EDIT.
// To modify this test, run "npm run makemanual importNameCodeFixExportAsDefault"
package fourslash_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestImportNameCodeFixExportAsDefault(t *testing.T) {
fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @Filename: /foo.ts
const foo = 'foo'
export { foo as default }
// @Filename: /index.ts
foo/**/`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.VerifyApplyCodeActionFromCompletion(t, new(""), &fourslash.ApplyCodeActionFromCompletionOptions{
Name: "foo",
Source: "./foo",
Description: "Add import from \"./foo\"",
NewFileContent: new(`import foo from "./foo";
foo`),
UserPreferences: nil, /*preferences*/
})
}