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

[no-identical-title] issue with describe.each #786

Closed
idan-at opened this issue Mar 8, 2021 · 2 comments · Fixed by #788
Closed

[no-identical-title] issue with describe.each #786

idan-at opened this issue Mar 8, 2021 · 2 comments · Fixed by #788

Comments

@idan-at
Copy link
Contributor

idan-at commented Mar 8, 2021

Hi,

This code will trigger a lint error:

describe("my tests", () => {
  describe.each`
    description
    ${'a'}
  `("$description", () => {})

  describe.each`
    description
    ${'b'}
  `("$description", () => {})
});

because the $description string repeats on both.

I'd expect those cases to actually resolve the title to what will be used on runtime, and then search for duplications.

so for example in this case, we'll have [a, b] as describeTitles, and not ["$description", "$description"]

@G-Rath
Copy link
Collaborator

G-Rath commented Mar 9, 2021

I'd expect those cases to actually resolve the title to what will be used on runtime

I don't think that's really feasible as there's a lot of ways you could pass data into .each, and an equally large number of ways you can do substitution.

I think for now we probably just shouldn't check duplicate titles for .each.

@github-actions
Copy link

github-actions bot commented Mar 9, 2021

🎉 This issue has been resolved in version 24.1.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

3 participants