context("add_css_header testing") test_that("Function fails for wrong inputs", { #no tableHTML expect_error(add_css_header(mtcars, css = list('background-color', 'lightgray')), 'tableHTML needs to be') #all checks ok expect_error(tableHTML(mtcars) %>% add_css_header(css = list(c('background-color', 'border'), c('lightgray', '3px solid green')), headers = 1) , NA) #check css list has same lengths expect_error(tableHTML(mtcars) %>% add_css_header(css = list(c('background-color', 'height'), 'lightgray')), 'same length') }) test_that("css is added with add_css_header", { #find style+ expect_true( grepl( '