tests/testthat/test-write_json.R

test_that("write_json()", {
  expect_error(
    write_json(
      list(a = 1, b = 2),
      path = file.path(tempdir(), "test_folder", "test_json.json"),
      .backup = TRUE
    ),
    NA,
  )
  expect_error(
    write_json(
      list(a = 1, b = 2),
      path = file.path(tempdir(), "test_folder", "test_json.json"),
      .backup = TRUE
    ),
    NA,
  )
  expect_error(
    write_json(
      list(a = 1, b = 2),
      path = file.path(tempdir(), "test_folder", "test_json.json"),
      .backup = TRUE
    ),
    NA,
  )
})
ddsjoberg/rstudio.prefs documentation built on July 20, 2022, 10:29 a.m.