Using interactive() in Shiny packages with external examples and shinytest

For a Shiny package, I have put examples using the @example(no s!) in external files to be able to run these with shinytest. Now I am uncertain what guard to use: if (interactive()) is not appropriate because the examples are supposed to run without manual interaction, and it also clutters the code. None of the tests is supposed to run in CRAN.

Any good practice?