Nothing
test_that("plot_camel_index returns a ggplot object", {
result <- camel_index(camel_2015, camel_2022)
p <- plot_camel_index(result)
expect_s3_class(p, "ggplot")
})
test_that("plot_camel_index highlights specific banks", {
result <- camel_index(camel_2015, camel_2022)
p <- plot_camel_index(result, highlight_banks = c("Absa", "Ecobank"))
expect_s3_class(p, "ggplot")
})
test_that("plot_camel_index warns on missing highlight banks", {
result <- camel_index(camel_2015, camel_2022)
expect_warning(
plot_camel_index(result, highlight_banks = c("Absa", "NonExistent")),
"not found"
)
})
test_that("plot_camel_index errors on non-camel_index input", {
expect_error(
plot_camel_index(list()),
"must be an object of class 'camel_index'"
)
})
test_that("plot_camel_index respects custom theme", {
result <- camel_index(camel_2015, camel_2022)
p <- plot_camel_index(result, theme_fn = ggplot2::theme_bw)
expect_s3_class(p, "ggplot")
})
test_that("autoplot.camel_index works", {
result <- camel_index(camel_2015, camel_2022)
p <- ggplot2::autoplot(result)
expect_s3_class(p, "ggplot")
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.