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
Testing Library officially suggests to use expect inside waitFor to wait for something. I think noMisplacedAssertion should allow this.
Also, sometimes it's handy to create own helper expect function, e.g. const expectSomeStuffToMatch = (stuff) => expect(stuff).toMatch(). Would be handy to allow using expect inside other functions which names start with expect as well.
Maybe a config for this rule with additional allowed function names?
Code of Conduct
I agree to follow Biome's Code of Conduct
The text was updated successfully, but these errors were encountered:
Environment information
Rule name
noMisplacedAssertion
Playground link
https://biomejs.dev/playground/?lintRules=all&code=aQBtAHAAbwByAHQAIAB7ACAAdwBhAGkAdABGAG8AcgAgAH0AIABmAHIAbwBtACAAJwBAAHQAZQBzAHQAaQBuAGcALQBsAGkAYgByAGEAcgB5AC8AcgBlAGEAYwB0ACcAOwAKAAoAYQB3AGEAaQB0ACAAdwBhAGkAdABGAG8AcgAoACgAKQAgAD0APgAgAHsACgAgACAAZQB4AHAAZQBjAHQAKAAxADEAMQApAC4AdABvAEIAZQAoADIAMgAyACkAOwAKAH0AKQA7AA%3D%3D
Expected result
Testing Library officially suggests to use
expect
insidewaitFor
to wait for something. I thinknoMisplacedAssertion
should allow this.Also, sometimes it's handy to create own helper expect function, e.g.
const expectSomeStuffToMatch = (stuff) => expect(stuff).toMatch()
. Would be handy to allow usingexpect
inside other functions which names start withexpect
as well.Maybe a config for this rule with additional allowed function names?
Code of Conduct
The text was updated successfully, but these errors were encountered: