Skip to content

Test with no expectation becomes a "skip" (problem for test_examples) #841

@colearendt

Description

@colearendt

When testthat runs a test_that with no expectations in it, the result is "Skipped." I think this behavior would preferably be "Passed", since the code was executed without error or skip().

In particular, this is certainly not correct behavior for test_examples(), which should not be expected to have an expectation. As a result, if we can change the behavior for test_example or test_examples() at least, that would be helpful!

Also, if we are not changing the default, is it possible that we could make the "Skip" note more informative? Something like Skipped: No expectation found. I found it quite confusing trying to debug why my tests were getting skipped, when they were in fact being executed but did not have an expectation.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions