tests/testthat/test-sonarqube.R

context("sonarqube_export")

test_that("it works with coverage objects", {
  tmp <- tempfile()
  cov <- package_coverage(test_path("TestSummary"))
  to_sonarqube(cov, filename = tmp)
  expect_equal(readLines(tmp), readLines(test_path("sonarqube.xml")))
})

Try the covr package in your browser

Any scripts or data that you put into this service are public.

covr documentation built on Nov. 9, 2023, 9:07 a.m.