function test(ast) {
            const code = getAstCode(ast);

            // eslint-disable-next-line no-new-func -- it's okay to eval code in tests
            return Function(`return ${code};`)();
        }
Evaluate the generated code of `getAstCode` function with given code.
@param {ASTNode} ast The AST node to test.
@returns {ASTNode} The result of the evaluation of the generated code.