Skip to content

userEvent.setup API does not return a Promise. #800

Closed
@macchiitaka

Description

@macchiitaka

Have you read the Troubleshooting section?

Yes

Plugin version

v6.0.0

ESLint version

v8.47.0

Node.js version

18.17.1

package manager and version

npm 9.6.7

Operating system

macOS Ventura, version 13.5

Bug description

The await-async-events rule expects the userEvent.setup API to return a Promise.
However, the userEvent.setup API does not return a Promise.

Steps to reproduce

  1. import userEvent from '@testing-library/user-event' module.
  2. run userEvent.setup() API.

Error output/screenshots

Screenshot 2023-08-14 at 22 59 07

ESLint configuration

.eslintrc.js

module.exports = {
  overrides: [
    
    {
      files: ['**/?(*.)+(spec|test).[jt]s?(x)'],
      extends: ['plugin:testing-library/react'],
    },
  ],
}

Rule(s) affected

await-async-events

Anything else?

No response

Do you want to submit a pull request to fix this bug?

No

Metadata

Metadata

Assignees

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