Skip to content

new rule request: prefer-find-by #127

Closed
@benmonro

Description

@benmonro

as described in Kent's blog post, it would be nice to have an autofix rule that converts

await waitFor(() => {
  expect(screen.getByText("foo")).toBeInTheDocument()
}

into this:

expect (await screen.findByText("foo")).toBeInTheDocument()

Metadata

Metadata

Assignees

No one assigned

    Labels

    new ruleNew rule to be included in the pluginreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions