← Back to all sparks
D

doctest

INFRA · APIS
Velocity3.8

Generate Tests from Examples Using 'roxygen' and 'testthat'

doctest is leaving CRAN: 0.4.1 is the last release through R's default channel.

r-packagestestingdocumentationdistributioncran
Current state
doctest lets R package authors write tests inline with documentation examples, generating .Rd content and test files from the same source. The current release is a small bugfix, removing empty lines that @testraw was producing in generated .Rd files. Feature work has been quiet, with the two most recent entries both correcting artifacts in generated output rather than adding capability.
Where it's heading
The direction is distribution, not features. The last release states plainly that future versions will ship as GitHub releases or through r-universe.dev, so the package is stepping outside CRAN while continuing to be developed. Read with 0.4.0, which suppressed Source line output so example edits stop producing irrelevant test churn, the recent work is about generated output being stable and predictable.
Prediction
The next versions should appear on GitHub and r-universe rather than CRAN, which means users on a CRAN-only install policy stay on 0.4.1 indefinitely. What the freedom from CRAN's review cycle gets spent on is not indicated in these entries.

Recent moves

  1. 17d ago

    Last CRAN release; development moves to GitHub and r-universe

    ⚡ SPARK

    The bugfix is minor, but the release note announces the package is leaving CRAN, which is the more consequential half. It reframes the quiet recent record as a package settling its generated output before changing how it ships.

    View source ↗
  2. 5mo ago

    Stops emitting Source line into generated tests

    Generated tests no longer carry a Source line, so editing an example stops producing diff noise in tests that did not meaningfully change. A small correctness fix in the same vein as 0.4.1's.

    View source ↗