tests/testthat/test-priors.R

library(shinytest)

test_that("Specification of custom priors", {
  skip_on_cran()
  skip_if_not_installed("MASS")
  
  shinytest::installDependencies()
  app_path <- system.file("shinybrms_app", package = "shinybrms")
  shinytest::expect_pass(shinytest::testApp(app_path, testnames = "priors.R"))
})

test_that("the group for the prior is not automatically set to be empty when not necessary.", {
  skip_on_cran()
  skip_if_not_installed("MASS")
  
  shinytest::installDependencies()
  app_path <- system.file("shinybrms_app", package = "shinybrms")
  shinytest::expect_pass(shinytest::testApp(app_path, testnames = "priors_autoSetEmpty.R"))
})

test_that("if necessary, the group for the prior is automatically reset when switching the class for the prior.", {
  skip_on_cran()
  skip_if_not_installed("MASS")
  
  shinytest::installDependencies()
  app_path <- system.file("shinybrms_app", package = "shinybrms")
  shinytest::expect_pass(shinytest::testApp(app_path, testnames = "priors_switchClass.R"))
})

Try the shinybrms package in your browser

Any scripts or data that you put into this service are public.

shinybrms documentation built on Aug. 6, 2022, 1:07 a.m.