package fourslash_test

import (
	"testing"

	"efprojects.com/kitten-ipc/kitcom/internal/tsgo/fourslash"
	"efprojects.com/kitten-ipc/kitcom/internal/tsgo/testutil"
)

func TestPackageJsonImportsFailedLookups(t *testing.T) {
	t.Parallel()

	defer testutil.RecoverAndFail(t, "Panic on fourslash test")
	const content = `// @Filename: /a/b/c/d/e/tsconfig.json
{ "compilerOptions": { "module": "nodenext" } }
// @Filename: /a/b/c/d/e/package.json
{
  "name": "app",
  "imports": {
    "#utils": "lodash"
  }
}
// @Filename: /a/b/node_modules/lodash/index.d.ts
export function add(a: number, b: number): number;
// @Filename: /a/b/c/d/e/index.ts
import { add } from "#utils";`
	f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
	f.GoToFile(t, "/a/b/c/d/e/index.ts")
}
