Skip to content

Bug: await-fire-event doesn't show the fireEvent method correctly in the error message #590

@Belco90

Description

@Belco90

Have you read the Troubleshooting section?

Yes

Plugin version

v5.5.0

ESLint version

v8.14.0

Node.js version

v16.15.0

package manager and version

npm v8.9.0

Operating system

macOS v12.3.1

Bug description

Errors reported by await-fire-event rule are not indicating the fireEvent method name correctly in the message.

Steps to reproduce

test('increments value on click', async () => {
  render(App);

  expect(screen.getByText('Times clicked: 0')).toBeDefined();

  const button = screen.getByText('increment');

  fireEvent.click(button);

  expect(screen.getByText('Times clicked: 1')).toBeDefined();
});

Error output/screenshots

CleanShot 2022-05-20 at 00 14 50

ESLint configuration

N/A

Rule(s) affected

await-fire-event

Anything else?

No response

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

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions