forestgeo/AGBfluxes

Add tests

maurolepore opened this issue · 1 comments

From @maurolepore on September 18, 2018 15:12

You are already testing, but likely in a non-systematic way: you write a function, run it, and see its output on the console to check check if it's right. You will save you a lot of time if you test systematically, with an automatic unit testing system such as the testthat package. To use testthat run:

usethis::use_testthat()

Then you will see tests/ in the root directory of your package. Then you add new tests with:

usethis::use_test("name-of-the-file-containing-the-functions-you-want-to-test")

This video shows the testing workflow: https://youtu.be/Ajtfdc2hnxo

Copied from original issue: ErvanCH/AGBflux_pack#10

This issue was moved to #10