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
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
1
# testthat (development version)
2
2
3
3
*`set_state_inspector()` gains `tolerance` argument and ignores minor FP differences by default (@mcol, #2237).
4
+
*`expect_vector()` fails, instead of erroring, if `object` is not a vector (@plietar, #2224).
4
5
* New `vignette("mocking")` explains mocking in detail (#1265).
5
6
* New `vignette("challenging-functions")` provides an index to other documentation organised by testing challenges (#1265).
6
7
* When running a test interactively, testthat now reports the number of succeses. The results should also be more useful if you are using nested tests.
7
8
* The hints generated by `expect_snapshot()` and `expect_snapshot_file()` now include the path to the package, if its not in the current working directory (#1577).
8
-
*`expect_snapshot_file()` now clearly errors if the `path`doesnt exist (#2191).
9
+
*`expect_snapshot_file()` now clearly errors if the `path`doesn't exist (#2191).
9
10
*`expect_snapshot_file()` now considers `.json` to be a text file (#1593).
10
11
*`expect_snapshot_file()` now shows differences for text files (#1593).
11
12
* The failure messages for all `expect_` functions have been rewritten to first state what was expected and then what was actually received (#2142).
@@ -20,7 +21,7 @@
20
21
*`local_mock()` and `with_mock()` have been deprecated because they are no longer permitted in R 4.5.
21
22
*`snapshot_review()` now passes `...` on to `shiny::runApp()` (#1928).
22
23
*`expect_named()` now gives more informative errors (#2091).
23
-
*`expect_*()` functions consistently and rigorously check their inputs (#1754).
24
+
*`expect_*()` functions consistently and rigorously check their inputs (#1754).
24
25
*`test_that()` no longer warns about the absence of `{}` since it no longer seems to be necessary.
25
26
*`test_that()`, `describe()`, and `it()` can now be arbitrarily nested. Each component will skip only if it and its subtests don't contain any expectations. The interactive stop reporter has been fixed so it doesn't duplicate failures. (#2063, #2188).
26
27
* Test filtering now works with `it()`, and the `desc` argument can take a character vector in order to recursively filter subtests (i.e. `it()` nested inside of `describe()`) (#2118).
@@ -39,7 +40,7 @@
39
40
* New `expect_r6_class()` (#2030).
40
41
*`expect_*()` functions consistently and rigorously check their inputs (#1754).
41
42
*`JunitReporter()` no longer fails with `"no applicable method for xml_add_child"` for warnings outside of tests (#1913). Additionally, warnings now save their backtraces.
42
-
*`JunitReporter()` strips ANSI escapes in more placese (#1852, #2032).
43
+
*`JunitReporter()` strips ANSI escapes in more places (#1852, #2032).
43
44
*`try_again()` is now publicised. The first argument is now the number of retries, not tries (#2050).
44
45
*`vignette("custom-expectations)` has been overhauled to make it much clearer how to create high-quality expectations (#2113, #2132, #2072).
45
46
*`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).
@@ -988,7 +989,7 @@ This release mostly focusses on an overhaul of how testthat works with condition
988
989
* In `expect_equal_to_reference()`, the default value for `update` is
989
990
now `FALSE` (@BrodieG, #683).
990
991
991
-
*`expect_error()` now returns the error object as documentated (#724).
992
+
*`expect_error()` now returns the error object as documented (#724).
992
993
It also now warns if you're using a classed expectation and you're
993
994
not using the `class` argument. This is good practice as it decouples the
994
995
error object (which tends to be stable) from its rendering to the user
@@ -1680,7 +1681,7 @@ The reporters system class has been considerably refactored to make existing rep
1680
1681
*`safe_digest()` uses a better strategy, and returns NA for directories
1681
1682
(#138, #146).
1682
1683
1683
-
* Random praise is renabled by default (again!) (#164).
1684
+
* Random praise is re-enabled by default (again!) (#164).
1684
1685
1685
1686
* Teamcity reporter now correctly escapes output messages (#150, @windelinckx).
0 commit comments