powered by
Create `testthat` test cases for the code.
create_unit_tests(code = clipr::read_clip(allow_non_interactive = TRUE))
A character value with the response generated by ChatGPT.
The code for which to create unit tests by ChatGPT. If not provided, it will use what's copied on the clipboard.
if (FALSE) { cat(create_unit_tests("squared_numbers <- function(numbers) {\n numbers ^ 2\n}")) }
Run the code above in your browser using DataLab