Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jul 23, 2024
1 parent 5f03206 commit f72985d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/testthat/test-blavaan.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,8 @@ test_that("blavaan, all", {

## Bayes factors ----

## FIXME: test fails
# expect_warning(bayesfactor_models(bfit, bfit2))
# x <- suppressWarnings(bayesfactor_models(bfit, bfit2))
# expect_lt(x$log_BF[2], 0)

## FIXME: test fails
# expect_warning(weighted_posteriors(bfit, bfit2))
# x <- suppressWarnings(weighted_posteriors(bfit, bfit2))
# expect_identical(ncol(x), 10L)
# For these models, no BF available, see #627
expect_error(bayesfactor_models(bfit, bfit2), regex = "Could not calculate Bayes")

bfit_prior <- unupdate(bfit)
capture.output(x <- expect_warning(bayesfactor_parameters(bfit, prior = bfit_prior)))

Check warning on line 82 in tests/testthat/test-blavaan.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=tests/testthat/test-blavaan.R,line=82,col=18,[implicit_assignment_linter] Avoid implicit assignments in function calls. For example, instead of `if (x <- 1L) { ... }`, write `x <- 1L; if (x) { ... }`.
Expand Down

0 comments on commit f72985d

Please sign in to comment.