unitTests {groqR} | R Documentation |
'Groq': Create Unit Tests
Description
Create {testthat}
test cases for the code.
Usage
unitTests(code = NULL, ...)
Arguments
code |
The code for which to create unit tests by 'Groq'. If not provided, it will use what's copied on the clipboard. |
... |
Following arguments can be set manually or in .Renviron:
|
Value
A character value with the response generated by 'Groq'.
Examples
## Not run:
cat(unitTests("squared_numbers <- function(numbers) {\n numbers ^ 2\n}"))
## End(Not run)