Debian Codegraph @

tests/testthat/helper-utils.R

raw
1 compressed_css <- function(x) {
2 gsub("\\s+|\\n", "", paste(as.character(x), collapse = ""))
3 }
4
5 expect_css <- function(input, css, output = NULL, ...) {
6 res <- sass(input, output = output, ...)
7 if (!is.null(output)) {
8 res <- read_utf8(res)
9 }
10 expect_identical(
11 compressed_css(res),
12 compressed_css(css)
13 )
14 }