Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prefer-expect-assertions] incorrect report when using multiple describes #1088

Closed
dglazkoff opened this issue Apr 22, 2022 · 3 comments · Fixed by #1089
Closed

[prefer-expect-assertions] incorrect report when using multiple describes #1088

dglazkoff opened this issue Apr 22, 2022 · 3 comments · Fixed by #1089

Comments

@dglazkoff
Copy link

dglazkoff commented Apr 22, 2022

Rule settings:

image

I have this eslint error with nested describe. Is it right rule behavior?

image

Hide test:

test.each<{ result: string; args: FormatNumberByTypeCommonArguments }>([
      { result: '11 ₽/день', args: {} },
      { result: '11 $/день', args: { currency: 'USD' } },
    ])('without fixed numerator currency value', ({ result, args }) => {
      expect(formatNumberByType(11, { type: 'ratio', numerator: 'currency', denominator: 'day' }, args)).toBe(result);
    });

If I remove the first test.each, I will have no error.

@G-Rath G-Rath changed the title prefer-expect-assertions with nested describe [prefer-expect-assertions] incorrect report when using multiple describes Apr 22, 2022
@G-Rath
Copy link
Collaborator

G-Rath commented Apr 22, 2022

Yeah this is a bug.

Just for future, could you please use code blocks of details like your code and config rather than just images?

@github-actions
Copy link

🎉 This issue has been resolved in version 26.1.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dglazkoff
Copy link
Author

dglazkoff commented Apr 23, 2022

Yea, sorry, I will. Thank you for fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants