Changelog
Source:NEWS.md
CHANGES IN testit VERSION 0.16
CRAN release: 2026-02-23
- Added support for snapshot testing with Markdown files; see https://pkg.yihui.org/testit/#snapshot-testing for more information.
CHANGES IN testit VERSION 0.15
CRAN release: 2025-12-19
The error location reporting stopped working in the previous version and was fixed in this version.
The error location will come with a clickable link on it if the environment supports ANSI links.
CHANGES IN testit VERSION 0.14
CRAN release: 2025-12-06
test_pkg()is compatible with R < 3.3.0 (if the function.traceback()is unavailable, the error location will not be printed).Re-licensed the package to MIT.
CHANGES IN testit VERSION 0.13
CRAN release: 2021-04-14
- The global option
options(testit.cleanup = TRUE)(TRUEis the default) can be used to clean up additional files or directories generated in thetests/directory during the test process.
CHANGES IN testit VERSION 0.12
CRAN release: 2020-09-25
-
test_pkg()installs the package before running tests when it is called from a non-interactive R session that is not launched byR CMD check, e.g., when you run tests in RStudio viaCtrl/Cmd + Shift + T, so you will not have to install the package manually (Ctrl/Cmd + Shift + B) before running tests.
CHANGES IN testit VERSION 0.10
CRAN release: 2019-10-01
-
test_pkg()also looks for tests under thetests/testit/directory. This makes it easier for you to runtest_pkg()under the root directory of the package, and you don’t need to change the working directory totests/.
CHANGES IN testit VERSION 0.9
CRAN release: 2018-12-05
- Added a new argument
silentto has_error() (thanks, @StevenMMortimer, #6).
CHANGES IN testit VERSION 0.8
CRAN release: 2018-06-14
- When
%==%is used inside assert(), a message will be printed if the value is not TRUE, to show the values of the LHS and RHS, respectively.
CHANGES IN testit VERSION 0.7
CRAN release: 2017-05-22
- provided an alternative way to write assertions of the form assert(‘fact’, {(condition_2); (condition_2)}); see ?testit::assert for more information
CHANGES IN testit VERSION 0.5
CRAN release: 2016-02-17
added an infix operator
%==%as an alias of identical() (in RStudio, you can use an add-in to insert the text%==%)test_pkg() will print out the filename of the R script that errored
CHANGES IN testit VERSION 0.3
CRAN release: 2013-10-26
the test files have to be named of the form test-.R (or test-.r), i.e. they have to use the prefix test-
the test environment is always cleaned (all objects removed) before the next test is run
CHANGES IN testit VERSION 0.2.1
CRAN release: 2013-07-30
- fixed a test that failed under R 2.15.x because the argument keep.source did not exist in parse()
CHANGES IN testit VERSION 0.2
CRAN release: 2013-07-29
- assert() does not use base::stopifnot() any more; a tailored version of stopifnot() is used now; see ?assert for the differences between this version and base::stopifnot(); in particular, assert(fact, logical(0)) will fail but stopifnot(logical(0)) will not
CHANGES IN testit VERSION 0.1
CRAN release: 2013-06-28
this is the first version of testit; the source code is hosted on Github: https://github.com/yihui/testit
added functions assert(), test_pkg(), has_error() and has_warning()