tests/testthat/test-class_terse.R

test_that("terse reporter", {
  skip_cran()
  tar_script({
    list(
      tar_target(x, seq_len(4L)),
      tar_target(y, x, pattern = map(x))
    )
  })
  suppressMessages(
    expect_message(tar_make(callr_function = NULL, reporter = "terse"))
  )
  tar_script({
    list(
      tar_target(x, stop("intentional error"))
    )
  })
  suppressMessages(
    expect_error(tar_make(callr_function = NULL, reporter = "terse"))
  )
  suppressMessages(
    expect_message(tar_outdated(callr_function = NULL, reporter = "terse"))
  )
})

Try the targets package in your browser

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

targets documentation built on April 12, 2025, 1:11 a.m.