You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NEWS.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,25 @@
1
1
# testthat (development version)
2
2
3
+
* New `SlowReporter` makes it easier to find the slowest tests in your package. The easiest way to run it is with `devtools::test(reporter = "slow")` (#1466).
4
+
* Power `expect_mapequal()` with `waldo::compare(list_as_map = TRUE)` (#1521).
5
+
* On CRAN, `test_that()` now automatically skips if a package is not installed (#1585). Practically, this means that you no longer need to check that suggested packages are installed. (We don't do this in the tidyverse because we think it has limited payoff, but other styles advise differently.)
6
+
*`expect_snapshot()` no longer skips on CRAN, as that skips the rest of the test. Instead it just returns, neither succeeding nor failing (#1585).
7
+
* Interrupting a test now prints the test name. This makes it easier to tell where a very slow test might be hanging (#1464)
8
+
* Parallel testthat now does not ignore test files with syntax errors (#1360).
9
+
*`expect_lt()`, `expect_gt()`, and friends have a refined display that is more likely to display the correct number of digits and shows you the actual values compared.
10
+
*`describe()`, `it()`, and `test_that()` now have a shared stack of descriptions so that if you nest any inside of each other, any resulting failures will show you the full path.
11
+
*`describe()` now correctly scopes `skip()` (#2007).
12
+
*`ParallelProgressReporter` now respect `max_failures` (#1162).
13
+
* The last snapshot is no longer lost if the snapshot file is missing the final newline (#2092). It's easy to accidentally remove this because there are two trailing new lines in snapshot files and many editors will automatically remove if you touch the file.
14
+
* New `expect_r6_class()` (#2030).
15
+
*`expect_*()` functions consistently and rigorously check their inputs (#1754).
16
+
*`JunitReporter()` no longer fails with `"no applicable method for xml_add_child"` for warnings outside of tests (#1913). Additionally, warnings now save their backtraces.
17
+
*`JunitReporter()` strips ANSI escapes in more placese (#1852, #2032).
18
+
*`try_again()` is now publicised. The first argument is now the number of retries, not tries (#2050).
19
+
*`vignette("custom-expectations)` has been overhauled to make it much clearer how to create high-quality expectations (#2113, #2132, #2072).
20
+
*`expect_snapshot()` and friends will now fail when creating a new snapshot on CI. This is usually a signal that you've forgotten to run it locally before committing (#1461).
21
+
*`expect_snapshot_value()` can now handle expressions that generate `-` (#1678) or zero length atomic vectors (#2042).
22
+
*`expect_matches()` failures should be a little easier to read (#2135).
3
23
* New `local_on_cran(TRUE)` allows you to simulate how your tests will run on CRAN (#2112).
4
24
*`expect_no_*()` now executes the entire code block, rather than stopping at the first message or warning (#1991).
5
25
*`expect_no_failures()` and `expect_no_successes()` are now deprecated as `expect_success()` now test for no failures and `expect_failure()` tests for no successes (#)
0 commit comments