# PlotEquiMap
save_PlotEquiMap <- function(...) {
  path <- tempfile(fileext = ".png")
  do.call(PlotEquiMap, list(..., fileout = path))
  path
}

test_that("1. 360x181", {

 set.seed(100)
 data <- array(rep(seq(-10, 10, length.out = 181), 360) + rnorm(360), 
               dim = c(lat = 181, lon = 360))

 expect_snapshot_file(
   save_PlotEquiMap(data, lon = 0:359, lat = -90:90, filled.continents = F),
   name = 'PlotEquiMap_1a.png' 
 )

 expect_snapshot_file(
   save_PlotEquiMap(data, lon = -180:179, lat = 90:-90, filled.continents = T, brks = seq(-13,13, 1), color_fun = clim.palette("purpleorange"), triangle_ends = c(T, T)),
   name = 'PlotEquiMap_1b.png' 
 )

})
