testing-library/eslint-plugin-testing-library

`userEvent.setup` API does not return a Promise.

macchiitaka opened this issue ยท 2 comments

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

check if you have a user.click or some user action that is not awaited

๐ŸŽ‰ This issue has been resolved in version 6.0.2 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€