jest/no-deprecated-functions
Configuration
Rule Details
Jest sometimes deprecates globals and jest helpers in favor of newer APIs. This rule flags calls to those deprecated members and reports a replacement. A fix rewrites the callee to the suggested API; bracket-style access is preserved (for example jest['genMockFromModule'] becomes jest['createMockFromModule']).
Which names are considered deprecated depends on the Jest version rslint uses for the file (from settings.jest.version or the resolved package.json dependency). A symbol is only reported once your configured major version is at least the version that deprecated it:
If the resolved Jest version is too old for any of these deprecations, the rule does not report them.
Examples of incorrect code for this rule (assuming a Jest version where the corresponding API is deprecated):
Examples of correct code for this rule: