diff --git a/tests/testthat/_snaps/chop.md b/tests/testthat/_snaps/chop.md index c6308056..a6d581da 100644 --- a/tests/testthat/_snaps/chop.md +++ b/tests/testthat/_snaps/chop.md @@ -11,12 +11,11 @@ Error in `chop()`: ! `cols` is absent but must be supplied. -# incompatible ptype mentions the column +# incompatible ptype mentions the column (#1477) Code - (expect_error(unnest(df, data, ptype = list(data = integer())))) - Output - + unnest(df, data, ptype = list(data = integer())) + Condition Error in `unnest()`: ! Can't convert `data[[2]]` to . diff --git a/tests/testthat/test-chop.R b/tests/testthat/test-chop.R index 967cf907..6490dca6 100644 --- a/tests/testthat/test-chop.R +++ b/tests/testthat/test-chop.R @@ -228,12 +228,12 @@ test_that("`ptype = list()` uses list ptype", { ) }) -test_that("incompatible ptype mentions the column", { +test_that("incompatible ptype mentions the column (#1477)", { df <- tibble(data = list(1, "2")) - expect_snapshot( - (expect_error(unnest(df, data, ptype = list(data = integer())))) - ) + expect_snapshot(error = TRUE, { + unnest(df, data, ptype = list(data = integer())) + }) }) test_that("unchopping a bare empty list results in unspecified()", {