context("test-columns") test_that("bulma_column_narrow() handles viewport and logical", { expect_equal_unclass <- function(x, y) { expect_equal(unclass(x), y) } expect_equal_unclass(bulma_column_narrow("touch"), "is-narrow-touch") expect_equal_unclass(bulma_column_narrow("desktop"), "is-narrow-desktop") expect_s3_class(bulma_column_narrow("desktop"), "bulma_column_narrow") expect_equal_unclass(bulma_column_narrow(TRUE), "is-narrow") expect_equal_unclass(bulma_column_narrow(), "is-narrow") expect_null(bulma_column_narrow(FALSE)) expect_error(bulma_column_narrow("touchscreen")) expect_warning(bulma_column_narrow(c("touch", "desktop"))) expect_warning(bulma_column_narrow(c("touchscreen", "touch"))) }) test_that("bulma_columns() with single bulma_column()", { expected <- '
Test
' expect_html_chr(bulma_columns(bulma_column("Test")), expected) })