Logo
Agent Skills Guide

testing-r-packages

published 2026/01/19

Best practices for writing R package tests using testthat version 3+. Use when writing, organizing, or improving tests for R packages. Covers test structure, expectations, fixtures, snapshots, mocking, and modern testthat 3 patterns including self-sufficient tests, proper cleanup with withr, and snapshot testing.

📦 Install Skill

Command line install

Install directly with the `skills` CLI.

npx skills add posit-dev/skills/r-lib/testing-r-packages

Local download

Download only this skill directory.

Download testing-r-packages only
File Explorer
0 files
No file selected
readonly

Select a file to view its content