mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
31 lines
1.0 KiB
Go
31 lines
1.0 KiB
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual documentHighlights_moduleImport_filesToSearchWithInvalidFile"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
. "github.com/microsoft/typescript-go/internal/fourslash/tests/util"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestDocumentHighlights_moduleImport_filesToSearchWithInvalidFile(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `// @Filename: /node_modules/@types/foo/index.d.ts
|
|
export const x: number;
|
|
// @Filename: /a.ts
|
|
import * as foo from "foo";
|
|
foo.[|x|];
|
|
// @Filename: /b.ts
|
|
import { [|x|] } from "foo";
|
|
// @Filename: /c.ts
|
|
import { x } from "foo";`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.VerifyBaselineDocumentHighlightsWithOptions(t, nil /*preferences*/, []string{"/a.ts", "/b.ts", "/unknown.ts"}, ToAny(f.Ranges())...)
|
|
}
|