tests/testthat/test-meta.R

test_that("howlerCurrentTrack fails with no id", {
  expect_error(howlerCurrentTrack())
})

test_that("howlerCurrentTrack passes with id", {
  expect_error(howlerCurrentTrack("test"), regexp = NA)
})

test_that("howlerCurrentTrack creates 'div' shiny.tag", {
  current_track_info <- howlerCurrentTrack("test")

  expect_is(current_track_info, "shiny.tag")
  expect_identical(current_track_info$name, "div")
  expect_match(current_track_info$attribs$class, "howler-current-track")
})

Try the howler package in your browser

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

howler documentation built on June 22, 2024, 9:48 a.m.