Skip to content

Add a rule for validating that actions are awaited #294

Open
@Aghassi

Description

Right now there are two await related rules

One to make sure that expect awaits if locators are what is being asserted on, and one to make sure there are no useless awaits. That being said you can still do the following

const locator = page.getByRole('button')
locator.click()

When you should have to use an await on locator.click().

It would be nice to have a rule to assert that all action driven functions also need an await call.

Alternatively, I'm open to other eslint rules that may already handle this case. I've tried a few but none of them seem to catch this use case.

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions