set.seed(123)
data("data", package = "ameras")


# Gaussian, basic model, all methods

for (method in all_methods) {
  test_that(paste("gaussian snapshot:", method), {
    if (method == "BMA") {
      skip_on_cran()
    }

    fit <- fit_combination(
      family = "gaussian",
      Y = "Y.gaussian",
      deg = 2,
      X = NULL,
      M = NULL,
      data = data,
      methods = method,
      niter.BMA = 1000,
      nburnin.BMA = 500
    )
    fit <- confint(fit, type = c("wald.orig", "percentile"))
    expect_snapshot_value(
      coef(fit),
      tolerance = 1e-4,
      style = "deparse"
    )
    expect_snapshot_value(fit[[method]]$sd, tolerance = 1e-4, style = "deparse")
    expect_snapshot_value(fit[[method]]$CI, tolerance = 1e-4, style = "deparse")
    expect_snapshot(print(summary(fit)$summary_table, digits = 2))
  })
}
