TokenToSeaSkills Hub
中文 Console

R Testthat

Posit, PBC

Best practices for writing R package tests with testthat version 3+. Use this skill when writing or organizing tests for an R package or when improving existing tests that use testthat. It covers test structure and expectations, self-sufficient test design, proper cleanup with withr, fixtures, mocking external dependencies, snapshot testing, and BDD-style describe/it patterns.

Install

npx skills add posit-dev/skills --skill r-testthat