Skip to content

Testing in enzyme creates TypeError: Cannot read property 'displayName' of undefined #320

@mschipperheyn

Description

@mschipperheyn

When mounting a component that contains KeyboardAwareScrollView, it generates an error

 TypeError: Cannot read property 'displayName' of undefined

      at getDisplayName (node_modules/react-native-keyboard-aware-scroll-view/lib/KeyboardAwareHOC.js:58:27)
      at KeyboardAwareHOC (node_modules/react-native-keyboard-aware-scroll-view/lib/KeyboardAwareHOC.js:415:103)
      at listenToKeyboardEvents (node_modules/react-native-keyboard-aware-scroll-view/lib/KeyboardAwareHOC.js:448:12)
      at Object.<anonymous> (node_modules/react-native-keyboard-aware-scroll-view/lib/KeyboardAwareSectionList.js:12:46)
      at Object.<anonymous> (node_modules/react-native-keyboard-aware-scroll-view/index.js:45:56)

This might occur bc I use a React.Fragment as a child of KeyboardAwareScrollView

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