Skip to content

Expo constants are undefined when executing tests #96

@sayo96

Description

@sayo96

Describe the bug

A clear and concise description of what the bug is.
I'm running into an error which says "Can't read manifest of undefined" when running tests. I do have a mock in place but i guess the issue lies within bugsnag-expo

For some weird reason, Constants appear as undefined here

if (Constants.manifest) {

Please do note that i have a mock function which mocks the expo constants as well

Steps to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Environment

  • Bugsnag version: 47.1.0
  • Expo SDK version (e.g. SDK 44): SDK 47 EAS Build
  • Device (e.g. iphonex):

Example Repo

  • Create a minimal repository that can reproduce the issue
  • Link to it here:

Example code snippet

# (Insert code sample to reproduce the problem)
Error messages: ● Test suite failed to run
TypeError: Cannot read property 'manifest' of undefined

  at Object.<anonymous> (node_modules/@bugsnag/expo/src/config.js:12:15)
  at Object.<anonymous> (node_modules/@bugsnag/expo/src/notifier.js:17:64)

This might be the possible fix :
expo/eas-cli#1265 (comment)

If yes, please implement it and publish it in a next release so i could use it

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogWe hope to fix this feature/bug in the futurefeature requestRequest for a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions