etiennebacher / altdoc

Alternative to pkgdown to document R packages
https://altdoc.etiennebacher.com
Other
65 stars 9 forks source link

Refactor and start testing man pages rendering #210

Closed etiennebacher closed 9 months ago

etiennebacher commented 9 months ago

Move .render_one_man() outside of .import_man() so that we can test it

vincentarelbundock commented 9 months ago

Adding tests sounds like a great idea, I'd just encourage you to "Test the surface not the volume."

Section 7.2: https://cran.r-project.org/web/packages/tinytest/vignettes/using_tinytest.pdf

etiennebacher commented 9 months ago

Yeah but that's hard to do when the output of functions is dozens or hundreds of files, which is why I prefer splitting in several components when possible. Would be great to have a small test package and do some sort of snapshot testing so that we can easily see which parts of its website are modified when we push something