From da89a11a245cdf6fe4124419ebbff27f9c509844 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sun, 3 May 2020 23:21:11 +1200 Subject: [PATCH] docs(no-deprecated-functions): update timeline for deprecations --- docs/rules/no-deprecated-functions.md | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/docs/rules/no-deprecated-functions.md b/docs/rules/no-deprecated-functions.md index 6e1678b77..0a90d7569 100644 --- a/docs/rules/no-deprecated-functions.md +++ b/docs/rules/no-deprecated-functions.md @@ -1,6 +1,6 @@ # Warns on usage of deprecated functions (no-deprecated-functions) -Over the years jest has accrued some debt in the form of functions that have +Over the years Jest has accrued some debt in the form of functions that have either been renamed for clarity, or replaced with more powerful APIs. While typically these deprecated functions are kept in the codebase for a number @@ -13,31 +13,28 @@ what to replace them with. This rule can also autofix a number of these deprecations for you. -### `require.requireActual.` & `require.requireMock` +### `require.requireActual` & `require.requireMock` -These functions were removed in Jest 26. +These functions were replaced in Jest 21 and removed in Jest 26. -Originally in the early days of jest, the `requireActual`& `requireMock` -functions were placed onto the `require` function. +Originally, the `requireActual` & `requireMock` the `requireActual`& +`requireMock` functions were placed onto the `require` function. These functions were later moved onto the `jest` global, and their use via `require` deprecated. Finally, the release of Jest 26 saw them removed from the `require` function all together. -The PR implementing the removal can be found -[here](https://github.com/facebook/jest/pull/9854). - ### `jest.addMatchers` -This function has been replaced with `expect.extend`, and will ideally be -removed in Jest 27. +This function has been replaced with `expect.extend`, and is scheduled for +removal in Jest 27. ### `jest.resetModuleRegistry` -This function has been renamed to `resetModules`, and will ideally be removed in -Jest 27. +This function has been renamed to `resetModules`, and is scheduled for removal +in Jest 26. ### `jest.runTimersToTime` -This function has been renamed to `advanceTimersByTime`, and will ideally be -removed in Jest 27. +This function has been renamed to `advanceTimersByTime`, and is scheduled for +removal in Jest 26.