tests/testthat/test-pipeline.R

test_that("add_stage", {
  expect_error(add_stage(mongopipe()), "type")
  expect_error(add_stage(mongopipe(), "$match"), "...")
})

test_that("check_query", {
  expect_s3_class(check_query(1), c("scalar", "numeric"))
})

Try the mongopipe package in your browser

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

mongopipe documentation built on Jan. 20, 2021, 5:08 p.m.