testing-r-packages
OfficialMaster R package testing with modern testthat 3.
Authorposit-dev
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps R developers adopt robust, maintainable testing practices for R packages by using testthat 3. It provides a clear blueprint for structuring tests, leveraging fixtures, snapshots, and mocking, while promoting consistent expectations and reliable results.
Core Features & Use Cases
- Test organization and patterns for testthat 3 (describe/it and test_that) to create readable, navigable suites.
- Fixtures, snapshot testing, and mocking strategies, with guidance on cleanup using withr for deterministic tests.
- Guidance on building CI-ready tests and scalable test suites that cover typical edge cases in package development.
Quick Start
Create a basic testthat 3 suite in your package and start writing describe/it or test_that blocks to cover core functions.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: testing-r-packages Download link: https://github.com/posit-dev/skills/archive/main.zip#testing-r-packages Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.