If you checking your code interactively, you might need to call local_reproducible_output() before running your test.
test_that("something specific happens", {local_reproducible_output() # <-- this happens implicitly# your test code, which might be sensitive to ambient conditions, such as# display width or the number of supported colors})