Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Modified the visual tests to better showcase the functionality.
  • Loading branch information
moutikabdessabour committed Oct 13, 2021
commit c240972c2b92bd672551bb46ce77c0cf305f4c29
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/fabletools/autoplot-fable.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions tests/testthat/test-fabletools.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
test_that("mimics the autoplot output", {
# taken from https://fable.tidyverts.org/articles/fable.html
p <- tsibble::tourism %>%
data <- tsibble::tourism %>%
filter(Region == "Melbourne") %>%
`[`(, c("Quarter", "Trips", "Region")) %>%
distinct(Quarter, .keep_all = TRUE) %>%
as_tsibble(key = Region)
p <- data %>%
model(
ets = ETS(Trips ~ trend("A")),
arima = ARIMA(Trips)
) %>%
forecast(h = "5 years") %>%
autoplot(tourism_melb)
autoplot(data)
expect_doppelganger(ggplotly(p), "autoplot-fable")
})