1
1
# Warns on usage of deprecated functions (no-deprecated-functions)
2
2
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
4
4
either been renamed for clarity, or replaced with more powerful APIs.
5
5
6
6
While typically these deprecated functions are kept in the codebase for a number
@@ -13,31 +13,28 @@ what to replace them with.
13
13
14
14
This rule can also autofix a number of these deprecations for you.
15
15
16
- ### ` require.requireActual. ` & ` require.requireMock `
16
+ ### ` require.requireActual ` & ` require.requireMock `
17
17
18
- These functions were removed in Jest 26.
18
+ These functions were replaced in Jest 21 and removed in Jest 26.
19
19
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.
22
22
23
23
These functions were later moved onto the ` jest ` global, and their use via
24
24
` require ` deprecated. Finally, the release of Jest 26 saw them removed from the
25
25
` require ` function all together.
26
26
27
- The PR implementing the removal can be found
28
- [ here] ( https://github.com/facebook/jest/pull/9854 ) .
29
-
30
27
### ` jest.addMatchers `
31
28
32
- This function has been replaced with ` expect.extend ` , and will ideally be
33
- removed in Jest 27.
29
+ This function has been replaced with ` expect.extend ` , and is scheduled for
30
+ removal in Jest 27.
34
31
35
32
### ` jest.resetModuleRegistry `
36
33
37
- This function has been renamed to ` resetModules ` , and will ideally be removed in
38
- Jest 27 .
34
+ This function has been renamed to ` resetModules ` , and is scheduled for removal
35
+ in Jest 26 .
39
36
40
37
### ` jest.runTimersToTime `
41
38
42
- This function has been renamed to ` advanceTimersByTime ` , and will ideally be
43
- removed in Jest 27 .
39
+ This function has been renamed to ` advanceTimersByTime ` , and is scheduled for
40
+ removal in Jest 26 .
0 commit comments