expect_no_error() loses traceback #2334
Copy link
Copy link
Open
Description
Activity
Here's a reprex:
library(testthat) f <- function() g() g <- function() stop("boom") # I want this: test_that("test", { f() }) # ── Error: test ─────────────── # Error in `g()`: boom # Backtrace: # ▆ # 1. └─global f() # 2. └─global g() # But I get this test_that("test", { expect_no_error(f()) }) # Expected `f()` not to throw any errors. # Actually got a <simpleError> with message: # boom
Metadata
Metadata
Assignees
Labels
No labels
e.g.
Having the traceback is very useful.