From d648e4713c11966531924eca236dab895d7fe4f7 Mon Sep 17 00:00:00 2001 From: Nicholas Masel Date: Wed, 30 Aug 2023 15:50:19 +0000 Subject: [PATCH] skip test is xml2 is also not installed --- tests/testthat/test-get.R | 1 + tests/testthat/test-writer.R | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/testthat/test-get.R b/tests/testthat/test-get.R index 122c10a..d792223 100644 --- a/tests/testthat/test-get.R +++ b/tests/testthat/test-get.R @@ -169,6 +169,7 @@ test_that("lint returns expected result when option is changed", { test_that("library lint returns expected result when multiple linters are set", { skip_if_not_installed("lintr") + skip_if_not_installed("xml2") options("log.rx" = NULL) withr::local_options(log.rx.lint = c(library_call_linter(), lintr::undesirable_operator_linter())) diff --git a/tests/testthat/test-writer.R b/tests/testthat/test-writer.R index 2aa99fb..d664089 100644 --- a/tests/testthat/test-writer.R +++ b/tests/testthat/test-writer.R @@ -215,6 +215,7 @@ test_that("write_lint_results will return a formatted lint results element", { test_that("write_lint_results works when linter is used but no lints found", { skip_if_not_installed("lintr") + skip_if_not_installed("xml2") filename <- test_path("ref", "ex6.R") source(filename, local = TRUE)