Open
Description
Summary
This is not the intended use, but the function auto_test
seems to fail on subsequent test file changes, with an error thrown in test_files
. Perhaps the error message could be made more informative.
Steps to reproduce
- open
R
session in terminal - run
devtools::create("./foo")
- run
cd foo
- run
usethis::use_testthat()
- run
usethis::use_test("foo")
- run
testthat::auto_test("./R", "./tests/testthat")
At this point, I get a confirmation that the test foo
passed:
== Results ==========================
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 1 ]
When I add, i.e., expect_equal(TRUE, TRUE)
to test-foo.R
and save, the tests are rerun, and test_files
throws an error:
== Results =============================================================
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 1 ]
Rerunning tests: test-foo.R
Error in test_files(test_dir = test_dir, test_package = test_package, :
argument "test_package" is missing, with no default
I am not very familiar with testthat
, but it seems that the error occurs on line 173:
Lines 171 to 182 in b0b3319