You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test!: custom check() never fails - migrate to testthat3 #54
Problem tests/test_kit.R:7-34 defines check(test,x,y,error,warning) that only does cat("Check ... failed.\n"); return(invisible(FALSE)). The file tail just does rm(...) with no stop() / stopifnot(). grep -c 'check(' = 1286, and the only stop hit is test data stop("bang!").
Result: R CMD check is always green even with regressions. 1286 silent checks give false confidence.
Evidence
tests/test_kit.R:7-34, tail rm(check,...) + # END, no failure propagation.
Update: pivoting this from testthat 3e (PR #64) to tinytest — new PR incoming, #64 will be closed as superseded.
Why the change: the actual bug here (silent check(), always-green R CMD check) is fixed equally well by either framework, but testthat 3.x costs ~15k lines + 22 dependencies and needs R >= 4.1, while kit itself is lean C code with zero Imports and R >= 3.1.0. tinytest is zero-dependency, needs R >= 3.0, and matches what this suite actually uses (expect_identical / expect_error / tolerant numeric compares — no snapshots, mocking, or reporters). Two extra wins: tests ship inside inst/tinytest/ so users can run tinytest::test_package("kit") post-install (nice for a compiled package), and covr is framework-agnostic so test-coverage.yaml needs no change.
Acceptance criteria still hold, just with different paths:
Loud failures instead of silent cat() — verified by mutation (3 deliberate failures, including one through the tolerant-compare helper, all detected with legacy-ID labels)
1271 expectations, 0 failures (parity with the testthat conversion)
Legacy IDs preserved as info= labels; interleaved setup order preserved
tests/test_kit.R deleted, replaced by tests/tinytest.R runner
Activity
davidbudzynski commentedon Sep 20, 2026
Update: pivoting this from testthat 3e (PR #64) to tinytest — new PR incoming, #64 will be closed as superseded.
Why the change: the actual bug here (silent
check(), always-greenR CMD check) is fixed equally well by either framework, but testthat 3.x costs ~15k lines + 22 dependencies and needs R >= 4.1, while kit itself is lean C code with zeroImportsandR >= 3.1.0. tinytest is zero-dependency, needs R >= 3.0, and matches what this suite actually uses (expect_identical/expect_error/ tolerant numeric compares — no snapshots, mocking, or reporters). Two extra wins: tests ship insideinst/tinytest/so users can runtinytest::test_package("kit")post-install (nice for a compiled package), andcovris framework-agnostic sotest-coverage.yamlneeds no change.Acceptance criteria still hold, just with different paths:
cat()— verified by mutation (3 deliberate failures, including one through the tolerant-compare helper, all detected with legacy-ID labels)info=labels; interleaved setup order preservedtests/test_kit.Rdeleted, replaced bytests/tinytest.Rrunner