소개
This skill provides specialized guidance for writing, organizing, and optimizing R package tests using the latest testthat features. It covers advanced patterns like self-sufficient tests, proper side-effect cleanup with withr, snapshot testing for complex outputs, and Behavior-Driven Development (BDD) using describe and it syntax. By following these patterns, users can ensure their R packages are robust, maintainable, and meet the high standards of the modern R ecosystem defined by Posit and r-lib.