mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
39 lines
1023 B
Go
39 lines
1023 B
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual refactorConvertToEsModule_module_nodenext"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestRefactorConvertToEsModule_module_nodenext(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `// @allowJs: true
|
|
// @target: esnext
|
|
// @module: node18
|
|
// @Filename: /a.js
|
|
module.exports = 0;
|
|
// @Filename: /b.ts
|
|
module.exports = 0;
|
|
// @Filename: /c.cjs
|
|
module.exports = 0;
|
|
// @Filename: /d.cts
|
|
module.exports = 0;`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.GoToFile(t, "/a.js")
|
|
f.VerifyCodeFixNotAvailable(t)
|
|
f.GoToFile(t, "/b.ts")
|
|
f.VerifyCodeFixNotAvailable(t)
|
|
f.GoToFile(t, "/c.cjs")
|
|
f.VerifyCodeFixNotAvailable(t)
|
|
f.GoToFile(t, "/d.cts")
|
|
f.VerifyCodeFixNotAvailable(t)
|
|
}
|