func rewriteTestFuncAsItStatement(testFunc *ast.FuncDecl, rootNode *ast.File, describe *ast.CallExpr) {
	var funcIndex int = -1
	for index, child := range rootNode.Decls {
		if child == testFunc {
			funcIndex = index
			break
		}
	}
	if funcIndex < 0 {
		panic(fmt.Sprintf("Assert failed: Error finding index for test node %s\n", testFunc.Name.Name))
	}
	var block *ast.BlockStmt = blockStatementFromDescribe(describe)
	block.List = append(block.List, createItStatementForTestFunc(testFunc))
	replaceTestingTsWithGinkgoT(block, namedTestingTArg(testFunc))
	rootNode.Decls = append(rootNode.Decls[:funcIndex], rootNode.Decls[funcIndex+1:]...)
}
/*
Given a test func named TestDoesSomethingNeat, rewrites it as
It("does something neat", func() { __test_body_here__ }) and adds it
to the Describe's list of statements
package convert
import (
	"bytes"
	"fmt"
	"go/ast"
	"go/format"
	"go/parser"
	"go/token"
	"os"
)
func rewriteTestsInFile(pathToFile string) {
	fileSet := token.NewFileSet()
	rootNode, err := parser.ParseFile(fileSet, pathToFile, nil, parser.ParseComments)
	if err != nil {
		panic(fmt.Sprintf("Error parsing test file '%s':\n%s\n", pathToFile, err.Error()))
	}
	addGinkgoImports(rootNode)
	removeTestingImport(rootNode)
	varUnderscoreBlock := createVarUnderscoreBlock()
	describeBlock := createDescribeBlock()
	varUnderscoreBlock.Values = []ast.Expr{describeBlock}
	for _, testFunc := range findTestFuncs(rootNode) {
		rewriteTestFuncAsItStatement(testFunc, rootNode, describeBlock)
	}
	underscoreDecl := &ast.GenDecl{
		Tok:    85,  
		TokPos: 14,  
		Specs:  []ast.Spec{varUnderscoreBlock},
	}
	imports := rootNode.Decls[0]
	tail := rootNode.Decls[1:]
	rootNode.Decls = append(append([]ast.Decl{imports}, underscoreDecl), tail...)
	rewriteOtherFuncsToUseGinkgoT(rootNode.Decls)
	walkNodesInRootNodeReplacingTestingT(rootNode)
	var buffer bytes.Buffer
	if err = format.Node(&buffer, fileSet, rootNode); err != nil {
		panic(fmt.Sprintf("Error formatting ast node after rewriting tests.\n%s\n", err.Error()))
	}
	fileInfo, err := os.Stat(pathToFile)
	if err != nil {
		panic(fmt.Sprintf("Error stat'ing file: %s\n", pathToFile))
	}
	err = os.WriteFile(pathToFile, buffer.Bytes(), fileInfo.Mode())
}