tests/testthat/test_aaa.R

#
# Tests should be quick and clean.
#

# temporarily here until devtools is fixed

helperopts <- simrOptions(nsim=10, progress=FALSE, pbnsim=5)

#
# NB: test lastResult here b/c this needs to be run before any simulations are done
#

context("lastResult")

test_that("lastResult works", {

    expect_error(lastResult(), "No result available to recover.")

    ps <- powerSim(fm1, nsim=1)

    expect_identical(lastResult(), ps)

})

Try the simr package in your browser

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

simr documentation built on April 14, 2023, 12:24 a.m.