tests/testthat/test-HARviewer.R

context("HARviewer")

test_that("canCreateaHARviewer", {
  har <- readHAR(system.file(package = "HARtools", "exdata",
                             "r-project.org.161028_W2_11MA.har"))
  hv <- HARviewer(har)
  expect_s3_class(hv, "HARviewer")
})

test_that("canCreateHARviewerOutput", {
  hvOutput <- HARviewerOutput("myHAR")
  expect_s3_class(hvOutput, "shiny.tag.list")
})

test_that("canRenderHARviewer", {
  har <- readHAR(system.file(package = "HARtools", "exdata",
                             "r-project.org.161028_W2_11MA.har"))
  hv <- HARviewer(har)
  rHV <- renderHARviewer(hv)
  expect_s3_class(rHV, "shiny.render.function")
})

Try the HARtools package in your browser

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

HARtools documentation built on May 29, 2017, 2:28 p.m.