Skip to content

Test error class rather than snapshot for errors from other packages #542

@hfrick

Description

@hfrick

This looks like we are testing errors from tidyselect in various places. Example:

Code
bootstraps(warpbreaks, strata = warpbreaks$tension)
Condition
Error in `bootstraps()`:
! Can't select columns that don't exist.
x Columns `L`, `L`, `L`, `L`, `L`, etc. don't exist.

If so, we should test the error class rather than the message, like here:

expect_error(vec_cast(x, x), class = "vctrs_error_incompatible_type")

Metadata

Metadata

Assignees

No one assigned

    Labels

    upkeepmaintenance, infrastructure, and similar

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions