tests/testthat/test-utils.R

test_that("create_if_not works", {

  # Test creating new
  expect_warning(
    create_if_not(
      file.path(tempdir(), "junk_directory")
    ),
    NA
  )

  # Test with existing
  expect_warning(
    create_if_not(
      file.path(tempdir(), "junk_directory")
    ),
    NA
  )
})

Try the unifir package in your browser

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

unifir documentation built on Dec. 3, 2022, 1:06 a.m.