We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 681befb commit ac6f8aeCopy full SHA for ac6f8ae
tests/testthat/test-aesthetics.R
@@ -68,6 +68,15 @@ test_that("setting mixed scheme works", {
68
"should be one of")
69
})
70
71
+test_that("setting brewer scheme works", {
72
+ skip_if_not_installed("RColorBrewer")
73
+ color_scheme_set("brewer-Blues")
74
+ expect_equivalent(unlist(color_scheme_get()), RColorBrewer::brewer.pal(6, "Blues"))
75
+ color_scheme_set("brewer-Spectral")
76
+ expect_equivalent(unlist(color_scheme_get()), RColorBrewer::brewer.pal(6, "Spectral"))
77
+ expect_error(color_scheme_set("brewer-FAKE"), "FAKE is not a valid palette")
78
+})
79
+
80
orange_scheme_bad <-
81
orange_scheme_ok <-
82
c("not_a_color1",
0 commit comments