tests/testthat/test-export.R

context("export")

test_that("canWriteAHARObject", {
  har1 <- readHAR(system.file(package = "HARtools",
                              "exdata", "google.com.har"))
  harFile <- tempfile(fileext = ".har")
  writeHAR(har1, harFile)
  har2 <- readHAR(harFile)
  expect_identical(har1, har2)
})

Try the HARtools package in your browser

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

HARtools documentation built on May 1, 2019, 10:56 p.m.