-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviorconditions
Description
The following test
test_that("should intentionally fail", {
erroneous_function <- function() {
stop("I am an errouneous function!")
}
expect_no_error(erroneous_function())
})produces the following output
> devtools::test()
ℹ Testing testingBug
✔ | F W S OK | Context
✖ | 1 1 | example
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Failure (test-example.R:3:5): should intentionally fail
Expected `erroneous_function()` to run without any errors.
i Actually got a <simpleError> with text:
I am an errouneous function!
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
══ Results ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
── Failed tests ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Failure (test-example.R:3:5): should intentionally fail
Expected `erroneous_function()` to run without any errors.
i Actually got a <simpleError> with text:
I am an errouneous function!
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 1 ]Why does it report OK 1 and PASS 1 when the only test actually fails (it produces an error)?
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviorconditions