generated from jasp-stats/jaspModuleTemplate
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e79e21c
commit d618463
Showing
2 changed files
with
77 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# General integration tests for Classic Process analysis | ||
|
||
test_that("Error handling works - observations", { | ||
options <- jaspTools::analysisOptions("ClassicProcess") | ||
options$dependent <- "contNormal" | ||
options$covariates <- list("debNaN") | ||
set.seed(1) | ||
results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) | ||
expect_identical(results[["status"]], "validationError", label = "Observations check") | ||
|
||
options <- jaspTools::analysisOptions("ClassicProcess") | ||
options$dependent <- "contNormal" | ||
options$factors <- list("debNaN") | ||
set.seed(1) | ||
results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) | ||
expect_identical(results[["status"]], "validationError", label = "Observations check") | ||
}) | ||
|
||
test_that("Error handling works - variance", { | ||
options <- jaspTools::analysisOptions("ClassicProcess") | ||
options$dependent <- "contNormal" | ||
options$covariates <- list("debSame") | ||
set.seed(1) | ||
results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) | ||
expect_identical(results[["status"]], "validationError", label = "Variance check") | ||
}) | ||
|
||
test_that("Error handling works - infinity", { | ||
options <- jaspTools::analysisOptions("ClassicProcess") | ||
options$dependent <- "contNormal" | ||
options$covariates <- list("debInf") | ||
set.seed(1) | ||
results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) | ||
expect_identical(results[["status"]], "validationError", label = "Infinity check") | ||
}) | ||
|
||
test_that("Error handling works - covariance", { | ||
options <- jaspTools::analysisOptions("ClassicProcess") | ||
options$dependent <- "contNormal" | ||
options$covariates <- list("debCollin1", "debCollin2") | ||
set.seed(1) | ||
results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) | ||
expect_identical(results[["status"]], "validationError", label = "Covariance check") | ||
}) |