package fourslash_test

import (
	"testing"

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

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

	defer testutil.RecoverAndFail(t, "Panic on fourslash test")
	const content = `// @allowJs: true
// @Filename: /bin/serverless.js
require('../lib/classes/Error').log/**/Warning(` + "`" + `CLI triage crashed with: ${error.stack}` + "`" + `);
// @Filename: /lib/plugins/aws/package/compile/events/httpApi/index.js
const { logWarning } = require('../../../../../../classes/Error');
// @Filename: /lib/classes/Error.js
module.exports.logWarning = message => { };`
	f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
	f.GoToMarker(t, "")
	f.VerifyBaselineFindAllReferences(t, "")
}
