Skip to content

Report act from react-test-renderer #494

Open
@Belco90

Description

@Belco90

What rule do you want to change?

no-unnecessary-act

Does this change cause the rule to produce more or fewer warnings?

More warnings

How will the change be implemented?

As discussed in #488 the act method from react-test-renderer must be reported too.

Example code

import { act } from "react-test-renderer";
import { fireEvent } from "@testing-library/react-native";

act(() => {
     ...fireEvent..
})

How does the current rule affect the code?

act is not reported since it's imported from react-test-renderer

How will the new rule affect the code?

act imported from react-test-renderer should be reported too.

Anything else?

No response

Do you want to submit a pull request to change the rule?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpinnedPinned for different reasons. Issues with this label won't be flagged as stale by stalebot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions