Skip to content

Commit

Permalink
another test
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Oct 16, 2023
1 parent 9ed846b commit c10daff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/testthat/_snaps/commit-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@
x Found untracked/unstaged/staged files in the git index: 'blop.R' and 'onemore.R'.
i Please commit or discard them and try again.

---

Code
check_only_modified(c("blop.R", "NEWS.md"))
Condition
Error in `check_only_modified()`:
x Found untracked/unstaged/staged file in the git index: 'onemore.R'.
i Please commit or discard it and try again.

5 changes: 5 additions & 0 deletions tests/testthat/test-commit-version.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ test_that("check_only_modified() works", {
expect_snapshot(error = TRUE, {
check_only_modified("NEWS.md")
})

file.create("onemore.R")
expect_snapshot(error = TRUE, {
check_only_modified(c("blop.R", "NEWS.md"))
})
})

0 comments on commit c10daff

Please sign in to comment.