You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Technically the rule is correct, and the fact that it wasn't erroring before was arguably a bug but I'm thinking maybe we should actually ignore except member calls except for hasAssertions and assertions as everything is valid to be used outside of test blocks 🤔
G-Rath
changed the title
jest/no-standalone-expect even for expect used in a __mocks__ file?
[no-standalone-expect]: false positive for expect.any in __mocks__ file
Aug 8, 2022
I have a file in
__mocks__
calledtwitch-js-api.js
and I'm using the following:Yet this rule now warns on
expect.any(String)
? Isn'texpect
allowed in mock files? This code has worked for years.The text was updated successfully, but these errors were encountered: