This commit is contained in:
Sharla Gelfand 2021-12-13 12:16:53 -05:00
Родитель 166bc9beee
Коммит 9037ac7050
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -3,7 +3,6 @@
#' @param input,output,session Internal parameters for {shiny}.
#' @noRd
app_server <- function(input, output, session) {
inputs <- mod_inputs_server("inputs")
pipeline <- mod_pipeline_server("pipeline", inputs)

Просмотреть файл

@ -90,21 +90,24 @@ test_that("prep_specs_summarize returns a list with four elements - one for the
})
test_that("prep_specs_summarize has meta.custom_animation if the summary function is mean or median, but not otherwise", {
specs <- "small_salary %>% group_by(Degree) %>% summarize(mean = mean(Salary))" %>% datamation_sanddance() %>%
specs <- "small_salary %>% group_by(Degree) %>% summarize(mean = mean(Salary))" %>%
datamation_sanddance() %>%
purrr::pluck("x") %>%
purrr::pluck("specs") %>%
jsonlite::fromJSON(simplifyDataFrame = FALSE)
expect_equal(specs[[4]][["meta"]][["custom_animation"]], "mean")
specs <- "small_salary %>% group_by(Degree) %>% summarize(median = median(Salary))" %>% datamation_sanddance() %>%
specs <- "small_salary %>% group_by(Degree) %>% summarize(median = median(Salary))" %>%
datamation_sanddance() %>%
purrr::pluck("x") %>%
purrr::pluck("specs") %>%
jsonlite::fromJSON(simplifyDataFrame = FALSE)
expect_equal(specs[[4]][["meta"]][["custom_animation"]], "median")
specs <- "small_salary %>% group_by(Degree) %>% summarize(sd = sd(Salary))" %>% datamation_sanddance() %>%
specs <- "small_salary %>% group_by(Degree) %>% summarize(sd = sd(Salary))" %>%
datamation_sanddance() %>%
purrr::pluck("x") %>%
purrr::pluck("specs") %>%
jsonlite::fromJSON(simplifyDataFrame = FALSE)