Skip to content

FlashList cannot be tested in Expo SDK 54 and FlashList v2 #1900

@SSHristow

Description

@SSHristow

Current behavior

After upgrading to Expo SDK 54 and FlashList v2, I have the following issue in my Jest tests, which are trying to render FlashList.
I didn't have this issue with Expo SDK 53 and FlashList v1!

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

I checked the testing docs https://shopify.github.io/flash-list/docs/testing, but there are no changes. I have the same setup, but with the upgrade doesn't seems to work anymore.

Expected behavior

To be able to test this component

Platform:

  • iOS
  • Android

Environment

  •  "@shopify/flash-list": "2.0.2"
  • "expo": "~54.0.1"
  • "jest": "~29.7.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions