Debugging tests

I am trying to write some tests

In the test I first make my call to a client side function which should return a value, so my test can check that value:

test_that("simple synthetic test", {
    res <- ds.syn2(data="D", method = "cart", m = 1, seed = 123)

But the call is failing and I get the familiar “check datashield.errors()”. But how can I do that in the context of the testing framework? Tom

Tom,

The “argument tests” have examples of checking “datashield.errors()”, for example, https://github.com/datashield/dsBaseClient/blob/v6.2-dev/tests/testthat/test-arg-ds.foobar.R.

Note the use of “expect_error” around the call to the method.

Stuart

ah the “expect_error” is the magic I was looking for!

Thanks