Skip to content

Commit

Permalink
Switch test expect_snapshot to explicit expect_warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vejnar committed Nov 26, 2023
1 parent efccac9 commit 4e40482
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
10 changes: 0 additions & 10 deletions tests/testthat/_snaps/utils.md

This file was deleted.

7 changes: 3 additions & 4 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ test_that("windows fallbacks work", {
})

test_that("check_version works as expected", {
expect_snapshot({
expect_equal(check_version("1", NULL), NULL)
expect_equal(check_version("1", "R"), "1")
})
expect_warning(out <- check_version("1", NULL), "version is ignored when appname is null")
expect_equal(out, NULL)
expect_equal(check_version("1", "R"), "1")
})

0 comments on commit 4e40482

Please sign in to comment.