I co-author a teaching R package that contains tutorials written in the
learnr framework. I am in the process of adding tests to the entire package.
I have no problems writing tests for the code boxes inside the tutorials (both in
tinytest). However, I wondered whether there was a way to write tests on the tutorial structure (
Rmarkdown code/ syntax - not the chunks of R code in the boxes).
I browsed the
learnr GitHub page and learned about
shinytest2. Still, it is not clear to me whether, within a
learnr tutorial, it is still used to test chunks of codes in the boxes or whether it is possible to monitor potential flows in the tutorial structure.
Has anyone written tests on the actual
Rmarkdown code inside the tutorials? If so,
- what are the possible solutions to test document integrity? --how has this problem been approached.
- Is there documentation on how to do it? Where can I find it?