mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
34 lines
962 B
Go
34 lines
962 B
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual getEditsForFileRename_keepFileExtensions"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestGetEditsForFileRename_keepFileExtensions(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `// @Filename: /tsconfig.json
|
|
{
|
|
"compilerOptions": {
|
|
"module": "Node16",
|
|
"rootDirs": ["src"]
|
|
}
|
|
}
|
|
// @Filename: /src/person.ts
|
|
export const name = 0;
|
|
// @Filename: /src/index.ts
|
|
import {name} from "./person.js";`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.VerifyWillRenameFilesEdits(t, "/src/person.ts", "/src/vip.ts", map[string]string{
|
|
"/src/index.ts": `import {name} from "./vip.js";`,
|
|
}, nil /*preferences*/)
|
|
}
|