Skip to content

Commit 5f41f93

Browse files
Merge pull request #416 from lorenzwalthert/test-use
Better test coverage for `use_precommit()`
2 parents 5ced5ec + 41ac5f4 commit 5f41f93

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/testthat/test-conda.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ if (!on_cran()) {
1717
)
1818
})
1919

20+
test_that("can use pre-commit", {
21+
tempdir <- local_test_setup(quiet = FALSE, install_hooks = FALSE)
22+
expect_message(
23+
use_precommit(open = FALSE, force = TRUE, install_hooks = TRUE, root = tempdir),
24+
"R specific hooks"
25+
)
26+
})
27+
2028
test_that("fails early if repo is not a git repo ", {
2129
tempdir <- local_test_setup(git = FALSE, quiet = FALSE, install_hooks = FALSE)
2230

0 commit comments

Comments
 (0)