Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest tests fail when importing appcenter or appcenter-push #298

Closed
anthonyhumphreys opened this issue Apr 27, 2018 · 2 comments
Closed

Jest tests fail when importing appcenter or appcenter-push #298

anthonyhumphreys opened this issue Apr 27, 2018 · 2 comments
Labels

Comments

@anthonyhumphreys
Copy link

Description

Compatibility with Jest

Cannot test a connected container that includes import AppCenter from 'appcenter';

Jest throws an error which prevents further test execution.

Repro Steps

Please list the steps used to reproduce your issue.

  1. import AppCenter from 'appcenter'; in a react-native container component.
  2. Write a snapshot test to test that component
  3. Execute said test

Details

  1. Which SDK version are you using?
    • 1.5.0
  2. Which OS version did you experience the issue on?
    • N/A
  3. What device version did you see this error on? Were you using an emulator or a physical device?
    • N/A
  4. What third party libraries are you using?
    • Jest
  5. Run the following command and paste the output below: react-native info

Place output here

  1. If you're developing for React Native iOS, run the following command and paste the output below: pod --version

Environment:
OS: Windows 10
Node: 8.10.0
Yarn: Not Found
npm: 5.6.0
Watchman: Not Found
Xcode: N/A
Android Studio: Version 3.0.0.0 AI-171.4443003

Packages: (wanted => installed)
react: ^16.3.2 => 16.3.2
react-native: 0.49.3 => 0.49.3

  1. Please enable verbose logging for your app using [MSAppCenter setLogLevel: MSLogLevelVerbose]; before your call to [AppCenterReactNative register]; (or any other SDK registration). For Android, use AppCenter.setLogLevel(android.util.Log.VERBOSE); before your SoLoader.init call. Include the logs here:

N/A

From AppCenter-Push


      at invariant (node_modules/react-native/node_modules/fbjs/lib/invariant.js:44:15)
      at new NativeEventEmitter (node_modules/react-native/Libraries/EventEmitter/NativeEventEmitter.js:31:1)
      at Object.<anonymous> (node_modules/appcenter-push/Push.js:5:26)
      at Object.<anonymous> (logic/actions/settingsActions.js:39:128)
@dhei dhei added the bug label Apr 27, 2018
@jmedellinMS
Copy link

Hi @antwan2093 ,
Thank you for reporting this. This looks like a bug and our team has an item in backlog for tracking this. We will update the thread once the fix is released. Sorry for the inconvenience.

@dhei
Copy link
Member

dhei commented Jun 20, 2018

This should be fixed in v1.6.0.

@dhei dhei closed this as completed Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants