powered by
Generates unit test code for an R function using the Gemini AI model.
gen_tests(prompt = NULL)
Invisibly returns the generated test code, but primarily inserts it into the RStudio console.
A character string specifying additional instructions for the Gemini model. If NULL, a default prompt requesting unit tests is used.
if (FALSE) { # Select your function code in the editor, then run: gen_tests() # For custom instructions: gen_tests("Generate comprehensive testthat tests with edge cases") }
Run the code above in your browser using DataLab