Skip to content

Commit

Permalink
Use less strict tests for JSON input data
Browse files Browse the repository at this point in the history
Since we cannot assume it will always be rectangular before the cleaning step
  • Loading branch information
Bisaloo committed Feb 4, 2022
1 parent e1afd31 commit f9672ac
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions R/test-DataClass.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,8 @@ test_download_JSON <- function(DataClass_obj, download, snapshot_path) {
{
DataClass_obj$download_JSON()
walk(DataClass_obj$data$raw, function(data) {
testthat::expect_s3_class(data, "data.frame")
testthat::expect_true(nrow(data) > 0)
testthat::expect_true(ncol(data) >= 2
|| typeof(data[[1]]) == "list")
testthat::expect_true(length(data) > 0)
testthat::expect_false(is.null(data))
})
}
)
Expand Down

0 comments on commit f9672ac

Please sign in to comment.