vendor tsgo
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
// Code generated by convertFourslash; DO NOT EDIT.
|
||||
// To modify this test, run "npm run makemanual renameFromNodeModulesDep1"
|
||||
|
||||
package fourslash_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/microsoft/typescript-go/internal/core"
|
||||
"github.com/microsoft/typescript-go/internal/fourslash"
|
||||
"github.com/microsoft/typescript-go/internal/ls/lsutil"
|
||||
"github.com/microsoft/typescript-go/internal/testutil"
|
||||
)
|
||||
|
||||
func TestRenameFromNodeModulesDep1(t *testing.T) {
|
||||
fourslash.SkipIfFailing(t)
|
||||
t.Parallel()
|
||||
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
||||
const content = `// @Filename: /index.ts
|
||||
import { /*okWithAlias*/[|Foo|] } from "foo";
|
||||
declare const f: Foo;
|
||||
f./*notOk*/bar;
|
||||
// @Filename: /tsconfig.json
|
||||
{ }
|
||||
// @Filename: /node_modules/foo/package.json
|
||||
{ "types": "index.d.ts" }
|
||||
// @Filename: /node_modules/foo/index.d.ts
|
||||
export interface Foo {
|
||||
bar: string;
|
||||
}`
|
||||
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
||||
defer done()
|
||||
f.GoToMarker(t, "okWithAlias")
|
||||
f.VerifyRenameSucceeded(t, &lsutil.UserPreferences{UseAliasesForRename: core.TSTrue})
|
||||
f.VerifyRenameFailed(t, &lsutil.UserPreferences{UseAliasesForRename: core.TSFalse})
|
||||
f.GoToMarker(t, "notOk")
|
||||
f.VerifyRenameFailed(t, nil /*preferences*/)
|
||||
}
|
||||
Reference in New Issue
Block a user