no-standalone-expect
Added in v0.8.1Configuration
rslint.config.ts
Rule Details
Disallows executable assertions outside a test callback. Assertions at module scope or directly in a suite run while the test file is registered, not as part of a test case.
Assertions inside helper functions are allowed because a test can call them. Static helpers such as expect.any() and expect.extend() are also allowed at module scope.