Using chromote in CRAN tests

We do not recommend using chromote in tests that you run on CRAN.

We do recommend that you test your package’s integration with chromote, just not on CRAN. Instead, use a continuous testing service, like GitHub Actions, and include testthat::skip_on_cran() in tests that require Chrome or chromote.

There are a number of issues with testing package functionality based on chromote on CRAN:

Given these challenges, we instead recommend:

  1. Using testthat::skip_on_cran() for tests that rely on the availability of Chrome.

  2. Run tests in a CI environment, ideally on a weekly or monthly schedule.

  3. Use the system version of Chrome provided by the CI environment, or use

    local_chrome_version("latest-stable")

    to ensure you’re testing against the latest stable version of Chrome.

    local_chrome_version("latest-stable", binary = "chrome-headless-shell")

    is another valid choice. See vignette("which-chrome") for details.