|
1 | 1 | # testthat (development version) |
2 | 2 |
|
| 3 | +* New `vignette("mocking")` explains mocking in detail (#1265). |
| 4 | +* New `vignette("challenging-functions")` provides an index to other documentation organised by testing challenges (#1265). |
3 | 5 | * 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. |
4 | 6 | * 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). |
5 | | -* `expect_snapshot_file()` now clearly errors if the `path` doesnt exist (#2191). |
| 7 | +* `expect_snapshot_file()` now clearly errors if the `path` doesn't exist (#2191). |
6 | 8 | * `expect_snapshot_file()` now considers `.json` to be a text file (#1593). |
7 | 9 | * `expect_snapshot_file()` now shows differences for text files (#1593). |
8 | 10 | * The failure messages for all `expect_` functions have been rewritten to first state what was expected and then what was actually received (#2142). |
|
17 | 19 | * `local_mock()` and `with_mock()` have been deprecated because they are no longer permitted in R 4.5. |
18 | 20 | * `snapshot_review()` now passes `...` on to `shiny::runApp()` (#1928). |
19 | 21 | * `expect_named()` now gives more informative errors (#2091). |
20 | | -* `expect_*()` functions consistently and rigorously check their inputs (#1754). |
| 22 | +* `expect_*()` functions consistently and rigorously check their inputs (#1754). |
21 | 23 | * `test_that()` no longer warns about the absence of `{}` since it no longer seems to be necessary. |
22 | 24 | * `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). |
23 | 25 | * 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). |
|
36 | 38 | * New `expect_r6_class()` (#2030). |
37 | 39 | * `expect_*()` functions consistently and rigorously check their inputs (#1754). |
38 | 40 | * `JunitReporter()` no longer fails with `"no applicable method for xml_add_child"` for warnings outside of tests (#1913). Additionally, warnings now save their backtraces. |
39 | | -* `JunitReporter()` strips ANSI escapes in more placese (#1852, #2032). |
| 41 | +* `JunitReporter()` strips ANSI escapes in more places (#1852, #2032). |
40 | 42 | * `try_again()` is now publicised. The first argument is now the number of retries, not tries (#2050). |
41 | 43 | * `vignette("custom-expectations)` has been overhauled to make it much clearer how to create high-quality expectations (#2113, #2132, #2072). |
42 | 44 | * `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). |
@@ -985,7 +987,7 @@ This release mostly focusses on an overhaul of how testthat works with condition |
985 | 987 | * In `expect_equal_to_reference()`, the default value for `update` is |
986 | 988 | now `FALSE` (@BrodieG, #683). |
987 | 989 |
|
988 | | -* `expect_error()` now returns the error object as documentated (#724). |
| 990 | +* `expect_error()` now returns the error object as documented (#724). |
989 | 991 | It also now warns if you're using a classed expectation and you're |
990 | 992 | not using the `class` argument. This is good practice as it decouples the |
991 | 993 | error object (which tends to be stable) from its rendering to the user |
@@ -1677,7 +1679,7 @@ The reporters system class has been considerably refactored to make existing rep |
1677 | 1679 | * `safe_digest()` uses a better strategy, and returns NA for directories |
1678 | 1680 | (#138, #146). |
1679 | 1681 |
|
1680 | | -* Random praise is renabled by default (again!) (#164). |
| 1682 | +* Random praise is re-enabled by default (again!) (#164). |
1681 | 1683 |
|
1682 | 1684 | * Teamcity reporter now correctly escapes output messages (#150, @windelinckx). |
1683 | 1685 | It also uses nested suites to include test names. |
|
0 commit comments