tests/testthat/test_make_hyperlink.R

context("make_hyperlink testing")

test_that("hyperlink is created", {
  
  mylinks <- c('www.abc.com', 'www.bca.com', 'https://www.def.com')
  mymessages <- c('abc', 'bca', 'def')
  
  #no tableHTML
  expect_true(all(grepl('<a href', make_hyperlink(mylinks))))

  
  #check css list has same lengths
  expect_true(all(grepl('<a href', make_hyperlink(mylinks, mymessages))))
  
})
LyzandeR/tableHTML documentation built on April 17, 2023, 3:57 p.m.