Skip to content

Spurious ... warning from expect_error/warning #1522

@nealrichardson

Description

@nealrichardson

It makes it harder to debug a failing test because it's misleading.

> testthat::expect_warning("no warning", "something", ignore.case = TRUE)
Error: "no warning" did not throw the expected warning.
Warning message:
1 components of `...` were not used.

We detected these problematic arguments:
* `ignore.case`

Did you misspecify an argument? 

You can even see it from a passing test:

> testthat::expect_warning("no warning", NA, ignore.case = TRUE)
Warning message:
1 components of `...` were not used.

We detected these problematic arguments:
* `ignore.case`

Did you misspecify an argument? 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions