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
Thanks for all the hard work on this incredibly useful plugin!
It looks like describe.each() and it.each() aren't handled and trigger the no-setup-in-describe rule when they shouldn't
Plain describe() and it() behave as expected (i.e. don't trigger no-setup-in-describe.
Some examples:
importexpectfrom'expect';// this triggers no-setup-in-describedescribe.each([['a'],['b']])('letter %s',letter=>{it('does something with the letter',()=>{// meaningless test so that example is runnableexpect(letter).toEqual(letter);});});describe('fruit',()=>{// this also triggers no-setup-in-describeit.each([['apples'],['oranges']])('eats %s',fruit=>{expect(eats(fruit)).toBe(true);});});
🤔 Mocha doesn’t have describe.each() or it.each(), so I think you need to specify additionalCustomNames so the rule knows about it and treats it as a describe or it block, see here.
Thanks for all the hard work on this incredibly useful plugin!
It looks like
describe.each()
andit.each()
aren't handled and trigger theno-setup-in-describe
rule when they shouldn'tPlain
describe()
andit()
behave as expected (i.e. don't triggerno-setup-in-describe
.Some examples:
package.json dependencies:
Could it be a similar problem to this? #249
The text was updated successfully, but these errors were encountered: