r-testing

Enforce testthat 3e describe/it testing conventions for R packages.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/drmowinckels/dotfiles --skill r-testing-drmowinckels
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r-testing
Source: https://github.com/drmowinckels/dotfiles/tree/main/config/claude/skills/r-testing
Command: npx skills add https://github.com/drmowinckels/dotfiles --skill r-testing-drmowinckels

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes and enforces best practices for testing R packages using testthat 3e, with describe/it structure and strict signal handling.

Core Features & Use Cases

  • Describe/It blocks implement a BDD-style testing approach for R packages.
  • Enforces strict signaling: avoid suppressWarnings/suppressMessages to ensure visibility of issues.
  • Provides guidance for test structure, fixtures, and readable test output across unit and integration tests.

Quick Start

Run devtools::test() to execute the package's tests using testthat 3e patterns.

Frequently Asked Questions about r-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use describe/it blocks for BDD-style testing in R packages?

To enforce strict signal handling in testthat 3e, you must avoid using suppressWarnings and suppressMessages in your R package tests. This ensures all warnings and messages remain visible, promoting transparent and clean test results for robust package development.

What is the best way to standardize R package testing conventions across unit and integration tests?

The best way to standardize R package testing conventions is to enforce testthat 3e with describe/it structures. This approach targets package developers seeking consistent, readable tests and transparent results across both unit and integration testing scenarios.

Do I need testthat 3e to implement describe/it testing structures for R packages?

Yes, you need testthat 3e to implement describe/it testing structures for R packages. The 3rd edition of testthat is required to properly enforce these robust BDD-style testing conventions and strict signal handling guidelines.

How do I execute R package tests using testthat 3e patterns?

To execute R package tests using testthat 3e patterns, you run the devtools::test() function. This processes your describe/it blocks and generates clean, transparent test output for your unit and integration testing scenarios.

Why should I avoid suppressWarnings and suppressMessages when writing R package tests?

You should avoid suppressWarnings and suppressMessages in R package tests to enforce strict signaling and ensure issue visibility. This testing convention guarantees clean output and transparent test results without hiding potential problems.