Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheng5 committed Dec 3, 2024
1 parent 8024897 commit 1873d1a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testthat/test-stacks-deep.R
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,16 @@ test_that("deep stack culling", {
expect_s3_class(dserr, "error", exact = FALSE)
stacktrace <- formatError(dserr)
expect_snapshot(stacktrace)
# Ensure that A__, I__, and J__ are present in the traces
expect_length(which(grepl("A__", stacktrace)), 1L)
expect_length(which(grepl("I__", stacktrace)), 1L)
expect_length(which(grepl("J__", stacktrace)), 1L)

# Ensure the message appears
expect_length(which(grepl("omitted 7 more stack traces", stacktrace)), 1L)

# Ensure that B__ through H__ are not present in the traces; these are the
# calls that were omitted
expect_false(any(grepl("B__", stacktrace)))
expect_false(any(grepl("C__", stacktrace)))
expect_false(any(grepl("D__", stacktrace)))
Expand Down

0 comments on commit 1873d1a

Please sign in to comment.