Pārlūkot izejas kodu

tests: Update and fix tests

pull/81/head
Garrick Aden-Buie pirms 2 gadiem
vecāks
revīzija
2a8fa1feed
Neizdevās izgūt parakstu
4 mainītis faili ar 12 papildinājumiem un 3 dzēšanām
  1. +1
    -1
      .gitignore
  2. +1
    -1
      R/style_extra_css.R
  3. +9
    -0
      tests/testthat/_snaps/utils.md
  4. +1
    -1
      tests/testthat/test-ggplot2.R

+ 1
- 1
.gitignore Parādīt failu

.history/ .history/


# Directories that start with _ # Directories that start with _
_*/
/_*/


## https://github.com/github/gitignore/blob/master/R.gitignore ## https://github.com/github/gitignore/blob/master/R.gitignore
# History files # History files

+ 1
- 1
R/style_extra_css.R Parādīt failu

if (is.null(names(css))) { if (is.null(names(css))) {
stop("All elements in `css` list must be named", call. = FALSE) stop("All elements in `css` list must be named", call. = FALSE)
} }
if (purrr::vec_depth(css) != 3) {
if (purrr::pluck_depth(css) != 3) {
stop(str_wrap( stop(str_wrap(
"`css` list must be a named list within a named list, e.g.:\n", "`css` list must be a named list within a named list, e.g.:\n",
' list(".class-id" = list("css-property" = "value"))' ' list(".class-id" = list("css-property" = "value"))'

+ 9
- 0
tests/testthat/_snaps/utils.md Parādīt failu

# printing google_font works

Code
google_font("Josefin Sans", "400", "400i", "600i", "700")
Output
Family: Josefin Sans
Weights: 400,400i,600i,700
URL: https://fonts.googleapis.com/css?family=Josefin+Sans:400,400i,600i,700&display=swap


+ 1
- 1
tests/testthat/test-ggplot2.R Parādīt failu

expect_equal(res$after_set$line_colour, "#0088ff") expect_equal(res$after_set$line_colour, "#0088ff")
expect_equal(res$after_set$bar_fill, "#FF8800") expect_equal(res$after_set$bar_fill, "#FF8800")
expect_equal(res$after_restore$line_colour, res$original$colour) expect_equal(res$after_restore$line_colour, res$original$colour)
expect_equal(res$after_restore$bar_fill, res$original$fil)
expect_equal(res$after_restore$bar_fill, res$original$fill)
}) })


describe("theme_xaringan_get_value()", { describe("theme_xaringan_get_value()", {

Notiek ielāde…
Atcelt
Saglabāt