Skip to content

False positive for testing-library/no-await-sync-events #403

Closed
@nickserv

Description

@nickserv

Using await with userEvent.type's delay option is correct, but is incorrectly flagged as a lint error.

async () => {
  const delay = 10
  // error  `userEvent.type` is sync and does not need `await` operator  testing-library/no-await-sync-events
  await userEvent.type(element, text, {delay})
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions