no-mocks-import
Configuration
rslint.config.ts
Rule Details
When using rs.mock, tests should import from the original module path, not directly from a __mocks__ directory. Directly importing a manual mock can create a separate module instance and make assertions behave unexpectedly.
This rule reports import declarations and require() calls whose module specifier contains a __mocks__ path segment.
Examples of incorrect code for this rule:
Examples of correct code for this rule: