mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-29 03:00:45 -04:00
* Fix #3250 pruneStackTrace was interacting badly with dplyr errors. I'm still not sure what causes these new cases, but the new behavior seems to be much better, with no downside that I can think of. * Fix existing unit tests * Update news Co-authored-by: Carson Sievert <cpsievert1@gmail.com>
34 lines
628 B
R
34 lines
628 B
R
foo <- function() {
|
|
capture <- function() {
|
|
list(
|
|
calls = sys.calls(),
|
|
parents = sys.parents()
|
|
)
|
|
}
|
|
|
|
capture_1 <- function() {
|
|
capture()
|
|
}
|
|
|
|
capture_2 <- function() {
|
|
capture_1()
|
|
}
|
|
|
|
do.call(
|
|
identity,
|
|
list(
|
|
identity(capture_2())
|
|
)
|
|
)
|
|
}
|
|
res <- foo()
|
|
res$calls <- tail(res$calls, 6)
|
|
res$parents <- tail(res$parents - (length(res$parents) - 6), 6)
|
|
|
|
describe("stack pruning", {
|
|
it("passes basic example", {
|
|
expect_equal(pruneStackTrace(res$parents), c(T, F, F, T, T, T))
|
|
expect_equal(lapply(list(res$parents), pruneStackTrace), list(c(T, F, F, T, T, T)))
|
|
})
|
|
})
|