Skip to content

Commit d80d061

Browse files
Add flags to skip code coverage for zzz.R (#1005)
1 parent 32702ae commit d80d061

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

R/zzz.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# nocov start
12
.default_ignore_start <- "styler: off"
23
.default_ignore_stop <- "styler: on"
34

@@ -67,3 +68,5 @@ remove_cache_old_versions <- function() {
6768
unlink(dir, recursive = TRUE, force = TRUE)
6869
})
6970
}
71+
72+
# nocov end

tests/testthat/test-zzz.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ test_that("styler tests did not use R.cache in user root", {
22
skip_on_cran()
33
skip_on_covr()
44
expect_true(
5-
length(list.files(R.cache::getCachePath("styler"), recursive = TRUE)) == 0
5+
length(list.files(R.cache::getCachePath("styler"), recursive = TRUE)) == 0L
66
)
77
})
88

@@ -11,6 +11,6 @@ test_that("clear Cache", {
1111
skip_on_cran()
1212
skip_on_covr()
1313
expect_true(
14-
length(list.dirs(R.cache::getCachePath("styler"))) == 1
14+
length(list.dirs(R.cache::getCachePath("styler"))) == 1L
1515
)
1616
})

0 commit comments

Comments
 (0)