Skip to content

Commit

Permalink
Don't run chromote tests if we aren't testing chromote
Browse files Browse the repository at this point in the history
  • Loading branch information
ashbythorpe committed Nov 3, 2023
1 parent c01dd4d commit 581fbaa
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ selenider_available <- function(session = c("chromote", "selenium"), online = TR
}

if (session == "chromote") {
is_installed("chromote") && tryCatch(
{
!is.null(suppressMessages(chromote::find_chrome()))
},
error = function(e) FALSE
)
Sys.getenv("SELENIDER_SESSION") %in% c("", "chromote") &&
is_installed("chromote") &&
tryCatch(
{
!is.null(suppressMessages(chromote::find_chrome()))
},
error = function(e) FALSE
)
} else {
rlang::is_installed("selenium") &&

Check warning on line 92 in R/utils.R

View check run for this annotation

Codecov / codecov/patch

R/utils.R#L92

Added line #L92 was not covered by tests
!is.null(find_browser_and_version()$browser)
Expand Down

0 comments on commit 581fbaa

Please sign in to comment.