tests/testthat/test-print-progress.R

testthat::test_that("you can print progress", {
  
  score <- print_progress(1, 100)
  
  expect_true(stringr::str_detect(score, "1 out of 100"))
})


testthat::test_that("you can print percentage", {
  
  score <- print_progress(1, 100, print_prct = T)
  
  expect_true(stringr::str_detect(score, "1.00%"))
})

Try the peRspective package in your browser

Any scripts or data that you put into this service are public.

peRspective documentation built on July 14, 2021, 9:06 a.m.