Skip to content

Issues in jest tests with expo 52, react 0.76 and new architectureΒ #4561

@stefankaetker

Description

@stefankaetker

Current behaviour

Usage of Icons, e.g. in TextInput left/right lead to issues in jest tests with expo 52 react 0.76 and new architecture enabled.

jest tests break with error: TypeError: loadedNativeFonts.forEach is not a function.
This is completely breaking my build pipeline.

Expected behaviour

npm test

--> all tests pass

How to reproduce?

I have isolated the issue in a small sample app (see https://github.com/stefankaetker/react-native-paper-jest-issue). clone the repo, do rpm install and then npm test.

Preview

What have you tried so far?

Pushing all components to latest version.

Your Environment

software version
ios x
android x
react-native 0.76.3
react-native-paper 5.12.5
node v20.11.1
npm or yarn npm: 10.9.0
expo sdk 52.0.11

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions