Skip to content

Testing components which use a fetcher does not work with createRemixStub #7776

Description

@KnisterPeter

What version of Remix are you using?

2.1.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

Create a simple remix app with a component using useFetcher.
Then write a test case using createRemixStub to test that component.

Expected Behavior

The component should render and eventually receive the loader data from the fetcher.

Actual Behavior

The initial state is rendered, the loader is called, but the loader data never reaches the fetcher.
The component is not re-rendered and the test fails.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions