Skip to content

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

Closed
@idan-at

Description

@idan-at

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"]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions