Skip to content

Commit

Permalink
edit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yjunechoe committed Jul 26, 2023
1 parent cf87026 commit 519876d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/testthat/test-progress.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ test_that("No side effects when called empty", {
expect_equal(julia_progress(), julia_progress())
})

old_opts <- julia_progress()
default_opts <- julia_progress()

test_that("Side effect by show, width, or both", {
julia_progress(show = FALSE)
expect_equal(julia_progress()$show, FALSE)
julia_progress(width = 100)
expect_equal(julia_progress()$width, 100)
julia_progress(old_opts)
expect_equal(julia_progress(), old_opts)
julia_progress(width = 20)
expect_equal(julia_progress()$width, 20)
julia_progress(default_opts)
expect_equal(julia_progress(), default_opts)
})

test_that("Restore startup option", {
julia_progress(show = TRUE, width = "auto")
expect_equal(old_opts, julia_progress())
expect_equal(default_opts, julia_progress())
})

0 comments on commit 519876d

Please sign in to comment.