- Failure locations are now formated as R error locations.
library_if_available()has been removed.
- test (
now return a
testthat_resultsobject that contains all results, and can be
printed or converted to data frame.
test_check()have an added
argument that allows filtering of test files using, e.g., Perl-style regular
fixedcharacter filtering. Arguments in
...are passed to
test_check()uses a new reporter specifically designed for
R CMD check.
It displays a summary at the end of the tests, designed to be <13 lines long
so test failures in
R CMD checkdisplay something more useful. This will
hopefully stop BDR from calling testthat a "test obfuscation suite" (#201).
compare()is now documented and exported. Added a numeric method so when
long numeric vectors don't match you'll see some examples of where the
problem is (#177). The line spacing in
skip_if_not_installed()skips tests if a package isn't installed (#192).
expect_that(a, equals(b))style of testing has been soft-deprecated.
It will keep working, but it's no longer demonstrated any where, and new
expectations will only be available in
expect_equal(a, b)style. (#172)
- Once again, testthat suppresses messages and warnings in tests (#189)
test_examples()lets you run package examples as tests. Each example
counts as one expectation and it succeeds if the code runs without errors
succeed()expectation always succeeds.
skip_on_travis()allows you to skip tests when run on Travis CI.
(Thanks to @mllg)
colourise()was removed. (Colour is still supported, via the
- Mocks can now access values local to the call of
- All equality expectations are now documented together (#173); all
matching expectations are also documented together.