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

package fourslash_test

import (
	"testing"

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

func TestImportNameCodeFix_require_importVsRequire_addToExistingWins(t *testing.T) {
	fourslash.SkipIfFailing(t)
	t.Parallel()
	defer testutil.RecoverAndFail(t, "Panic on fourslash test")
	const content = `// @allowJs: true
// @checkJs: true
// @Filename: blah.js
export default class Blah {}
export const Named1 = 0;
export const Named2 = 1;
// @Filename: index.js
var path = require('path')
  , { promisify } = require('util')
  , { Named1 } = require('./blah')

import fs from 'fs'

new Blah`
	f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
	defer done()
	f.GoToFile(t, "index.js")
	f.VerifyCodeFix(t, fourslash.VerifyCodeFixOptions{
		Description: "Update import from \"./blah\"",
		NewFileContent: `var path = require('path')
  , { promisify } = require('util')
  , { Named1, default: Blah } = require('./blah')

import fs from 'fs'

new Blah`,
		Index: 0,
	})
}
