gen_tests {gemini.R}R Documentation

Generate Unit Tests for R Functions

Description

Generates unit test code for an R function using the Gemini AI model.

Usage

gen_tests(prompt = NULL)

Arguments

prompt

A character string specifying additional instructions for the Gemini model. If NULL, a default prompt requesting unit tests is used.

Value

Invisibly returns the generated test code, but primarily inserts it into the RStudio console.

Examples

## Not run: 
# Select your function code in the editor, then run:
gen_tests()

# For custom instructions:
gen_tests("Generate comprehensive testthat tests with edge cases")

## End(Not run)


[Package gemini.R version 0.16.0 Index]