// Code generated by convertFourslash; DO NOT EDIT.
// To modify this test, run "npm run makemanual rewriteRelativeImportExtensionsProjectReferences1"

package fourslash_test

import (
	"testing"

	"github.com/microsoft/typescript-go/internal/fourslash"
	"github.com/microsoft/typescript-go/internal/testutil"
)

func TestRewriteRelativeImportExtensionsProjectReferences1(t *testing.T) {
	fourslash.SkipIfFailing(t)
	t.Parallel()
	defer testutil.RecoverAndFail(t, "Panic on fourslash test")
	const content = `// @Filename: packages/common/tsconfig.json
{
    "compilerOptions": {
        "lib": ["es5"],
        "composite": true,
        "rootDir": "src",
        "outDir": "dist",
        "module": "nodenext",
        "resolveJsonModule": false,
    }
}
// @Filename: packages/common/package.json
{
    "name": "common",
    "version": "1.0.0",
    "type": "module",
    "exports": {
        ".": {
            "source": "./src/index.ts",
            "default": "./dist/index.js"
        }
    }
}
// @Filename: packages/common/src/index.ts
export {};
// @Filename: packages/main/tsconfig.json
{
    "compilerOptions": {
        "module": "nodenext",
        "rewriteRelativeImportExtensions": true,
        "lib": ["es5"],
        "rootDir": "src",
        "outDir": "dist",
        "resolveJsonModule": false,
    },
    "references": [
        { "path": "../common" }
    ]
}
// @Filename: packages/main/package.json
{ "type": "module" }
// @Filename: packages/main/src/index.ts
import {} from "../../common/src/index.ts";`
	f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
	defer done()
	f.MarkTestAsStradaServer()
	f.GoToFile(t, "/packages/main/src/index.ts")
	f.VerifyBaselineNonSuggestionDiagnostics(t)
}
