Software Development

R Testthat

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.

Publisher / source
posit-dev/skills (found on skills.sh)
Upstream record
posit-dev/skills
Version
Version 3
Published
Publication review
Approved for publication
Content fingerprint
1ab412ca413fa9a1420e74157af3828218dafe7d15fe560c19b11986264c0d02