Testing R Packages

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.

quarto-dev 5922e0f 6 files · 45.0 KB Updated

File contents

quarto-dev/quarto-r/tree/main/.claude/skills/testing-r-packages commit 5922e0fb61

Frequently asked questions

npx skillmds@latest add quarto-dev/testing-r-packages