View source: R/create_unit_tests.R
create_unit_tests | R Documentation |
Create 'testthat' test cases for the code.
create_unit_tests(code = clipr::read_clip(allow_non_interactive = TRUE))
code |
The code for which to create unit tests by ChatGPT. If not provided, it will use what's copied on the clipboard. |
A character value with the response generated by ChatGPT.
## Not run:
cat(create_unit_tests("squared_numbers <- function(numbers) {\n numbers ^ 2\n}"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.