Skip to content

Commit b63c43e

Browse files
committed
docs(no-deprecated-functions): update timeline for deprecations
1 parent 73a5d36 commit b63c43e

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

docs/rules/no-deprecated-functions.md

+15-17
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Warns on usage of deprecated functions (no-deprecated-functions)
22

3-
Over the years jest has accrued some debt in the form of functions that have
3+
Over the years Jest has accrued some debt in the form of functions that have
44
either been renamed for clarity, or replaced with more powerful APIs.
55

66
While typically these deprecated functions are kept in the codebase for a number
@@ -13,31 +13,29 @@ what to replace them with.
1313

1414
This rule can also autofix a number of these deprecations for you.
1515

16-
### `require.requireActual.` & `require.requireMock`
16+
### `require.requireActual` & `require.requireMock`
1717

18-
These functions were removed in Jest 26.
18+
These functions were replaced in Jest 21 and removed in Jest 26.
1919

20-
Originally in the early days of jest, the `requireActual`& `requireMock`
21-
functions were placed onto the `require` function.
20+
Originally, the `requireActual` & `requireMock` the `requireActual`&
21+
`requireMock` functions were placed onto the `require` function.
2222

23-
These functions were later moved onto the `jest` global, and their use via
24-
`require` deprecated. Finally, the release of Jest 26 saw them removed from the
25-
`require` function all together.
26-
27-
The PR implementing the removal can be found
28-
[here](https://github.com/facebook/jest/pull/9854).
23+
These functions were later moved onto the `jest` object in order to be easier
24+
for type checkers to handle, and their use via `require` deprecated. Finally,
25+
the release of Jest 26 saw them removed from the `require` function all
26+
together.
2927

3028
### `jest.addMatchers`
3129

32-
This function has been replaced with `expect.extend`, and will ideally be
33-
removed in Jest 27.
30+
This function was replaced with `expect.extend` in Jest 17, and is scheduled for
31+
removal in Jest 27.
3432

3533
### `jest.resetModuleRegistry`
3634

37-
This function has been renamed to `resetModules`, and will ideally be removed in
38-
Jest 27.
35+
This function was renamed to `resetModules` in Jest 15, and is scheduled for
36+
removal in Jest 27.
3937

4038
### `jest.runTimersToTime`
4139

42-
This function has been renamed to `advanceTimersByTime`, and will ideally be
43-
removed in Jest 27.
40+
This function was renamed to `advanceTimersByTime` in Jest 22, and is scheduled
41+
for removal in Jest 27.

0 commit comments

Comments
 (0)