I use tinytest to test a package. As I am testing multiple similar inputs with the same expected results, I created a small test-helper-function within the test_*.R file.
However, if a test failed, I do not get the typical failed notification. For example, in the following function, I would expect to get a summary or a direct failure but instead it returns
library(tinytest)
test_function <- function() {
expect_equal(1, 1)
expect_equal(2, 1)
expect_equal(1, 1)
}
test_function()
#> ----- PASSED : <-->
#> call| test_function()
Note that if I replace tinytest with testthat the function stops and returns an error as expected.
Is this expected behavior or what did I miss when reading the documentation and how can I use tinytest within such a testing function?