use_test
Creates a matching testthat test file under tests/testthat/ for a specified function or module, automatically configuring testthat when needed.
Instructions
Create a matching test file under tests/testthat/ for a given function or module using usethis::use_test(). Automatically sets up testthat if not already configured.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"project_path": "<project_path>"
},
"name": "use_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the function or module to create a test file for. | |
| project_path | Yes | Absolute path to the root of the R package. |