-
Notifications
You must be signed in to change notification settings - Fork 136
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
Fix jest in TestApp #314
Fix jest in TestApp #314
Conversation
@MatkovIvan, eslint is not happy with mocks in |
@MatkovIvan Let's wait #303 to do that and have test app point at mock files provided by SDK. |
a7cc41b
to
e116966
Compare
@@ -0,0 +1,9 @@ | |||
const Crashes = jest.mock('appcenter-crashes'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please catch up with develop and remove those. Might need to revisit the PR entirely now that #303 is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the following errors when running npm run test
after running ./update-npm-packages.sh
on this branch:
npm run test
> [email protected] test /Users/guperrot/git/appcenter-sdk-react-native/TestApp
> jest
RUNS __tests__/index.ios.js
RUNS __tests__/index.android.js
Test Suites: 0 of 2 total
Tests: 0 total
Snapshots: 0 total
console.error node_modules/react-native/Libraries/ReactNative/YellowBox.js:73
The above error occurred in the <AnimatedComponent> component:
in AnimatedComponent (created by Card)
in Card (created by Container)
in Container (created by CardStack)
in View (created by Component)
in Component (created by CardStack)
in View (created by Component)
in Component (created by CardStack)
in CardStack (created by Transitioner)
in View (created by Component)
in Component (created by Transitioner)
in Transitioner (created by CardStackTransitioner)
in CardStackTransitioner
in Unknown (created by Navigator)
in Navigator (created by NavigationContainer)
in NavigationContainer
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
console.error node_modules/react-native/Libraries/ReactNative/YellowBox.js:73
The above error occurred in the <AnimatedComponent> component:
in AnimatedComponent (created by Card)
in Card (created by Container)
in Container (created by CardStack)
in View (created by Component)
in Component (created by CardStack)
in View (created by Component)
in Component (created by CardStack)
in CardStack (created by Transitioner)
in View (created by Component)
in Component (created by Transitioner)
in Transitioner (created by CardStackTransitioner)
in CardStackTransitioner
FAIL __tests__/index.android.js (16.119s)
✕ renders correctly (218ms)
● renders correctly
TypeError: Cannot read property '__getValue' of undefined
at AnimatedComponent.render (node_modules/react-native/Libraries/Animated/src/createAnimatedComponent.js:154:9)
at finishClassComponent (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:3666:31)
at updateClassComponent (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:3643:12)
at beginWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:4017:16)
at performUnitOfWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6008:16)
at workLoop (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6072:26)
at Object.invokeGuardedCallback$1 (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:1553:10)
at invokeGuardedCallback (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:1500:29)
at renderRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6150:7)
at performWorkOnRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6764:24)
FAIL __tests__/index.ios.js (16.134s)
✕ renders correctly (258ms)
● renders correctly
TypeError: Cannot read property '__getValue' of undefined
at AnimatedComponent.render (node_modules/react-native/Libraries/Animated/src/createAnimatedComponent.js:154:9)
at finishClassComponent (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:3666:31)
at updateClassComponent (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:3643:12)
at beginWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:4017:16)
at performUnitOfWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6008:16)
at workLoop (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6072:26)
at Object.invokeGuardedCallback$1 (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:1553:10)
at invokeGuardedCallback (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:1500:29)
at renderRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6150:7)
at performWorkOnRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6764:24)
Test Suites: 2 failed, 2 total
Tests: 2 failed, 2 total
Snapshots: 0 total
Time: 18.567s
No description provided.