mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
41 lines
992 B
Go
41 lines
992 B
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual importNameCodeFix_exportEquals"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestImportNameCodeFix_exportEquals(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `// @module: commonjs
|
|
// @esModuleInterop: false
|
|
// @allowSyntheticDefaultImports: false
|
|
// @Filename: /a.d.ts
|
|
declare function a(): void;
|
|
declare namespace a {
|
|
export interface b {}
|
|
}
|
|
export = a;
|
|
// @Filename: /b.ts
|
|
a;
|
|
let x: b;`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.GoToFile(t, "/b.ts")
|
|
f.VerifyCodeFixAll(t, fourslash.VerifyCodeFixAllOptions{
|
|
FixID: "fixMissingImport",
|
|
NewFileContent: `import { b } from "./a";
|
|
import a = require("./a");
|
|
|
|
a;
|
|
let x: b;`,
|
|
})
|
|
}
|