Skip to content

test coverage of at least 75% #23

@e-kotov

Description

@e-kotov

https://devguide.ropensci.org/pkg_building.html#testing

To quote key relevant points from the guidelines:

  • All packages should have a test suite that covers major functionality of the package. The tests should also cover the behavior of the package in case of errors.

  • It is good practice to write unit tests for all functions, and all package code in general, ensuring key functionality is covered. Test coverage below 75% will likely require additional tests or explanation before being sent for review.

...

...

  • testthat has a function skip_on_cran() that you can use to not run tests on CRAN. We recommend using this on all functions that are API calls since they are quite likely to fail on CRAN. These tests should still run on continuous integration. Note that from testthat 3.1.2 skip_if_offline() automatically calls skip_on_cran(). More info on CRAN preparedness for API wrappers.

...

  • Even if you use continuous integration, we recommend that you run tests locally prior to submitting your package (you might need to set Sys.setenv(NOT_CRAN="true")).

Sub-issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions