home.social

#nocov — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #nocov, aggregated by home.social.

  1. Day 13: covr - Test Coverage Reporting

    Track how much of your code is tested.
    use for code you don't want to cover (like basic R functions etc)

    Basic usage:
    covr::package_coverage()
    covr::report()

    Integration with CI:
    usethis::use_github_action("test-coverage")
    usethis::use_coverage() # Adds codecov badge

    Pro Tip: Aim for >80% coverage, but focus on testing critical functions thoroughly rather than chasing 100%.
    Resources: covr.r-lib.org