is_testing() determine if code is being run as part of a test
is_parallel() if the test is being run in parallel.
testing_package() gives name of the package being tested.
These are thin wrappers that retrieve the values of environment variables. To avoid creating a run-time dependency on testthat, you can inline the source of these functions directly into your package.
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.