Block on mobile unit tests fail and instructions on how to debug#18454
Conversation
|
Works for me, but I'm not the best person to validate changes, @Tug maybe? :) |
Tug
left a comment
There was a problem hiding this comment.
Yep the --inspect-brk option should do the trick 👍
Nice addition to the documentation!
Because there's also a Platform npm package installed too, running the native mobile unit tests locally (at least on macOS) results in picking up the wrong object. Putting the react-native/Libraries/Utilities first, Jest manages to resolve the proper Platform import. See https://github.com/facebook/react-native/blob/v0.60.0/Libraries/react-native/react-native-implementation.js#L324-L326 for the import. The ambiguity seems fixed in RN v0.61.4 with react/react-native@62c605e
|
There is also the Testing Overview document: We should either move the details about testing there and cross-reference or the other way around. This is really important so it's easy to find details about the native app. |
Makes sense and I was thinking something along those line too 👍. Addressed with e5a0a97. |
gziolo
left a comment
There was a problem hiding this comment.
Thank you for working for all those additions to contributors guide ❤️
|
Nice, thanks, feel free to merge 👍 |
|
I'm going to leave this PR open for another day before merging. We brought this up more widely in the #core-editor weekly chat yesterday so, will leave some time for people to comment if any. |
|
No new comments here so, will go ahead and merge. |
Description
This PR makes the native mobile tests Travis job necessary to succeed for the whole Travis run to "green".
How has this been tested?
Online via Travis itself on this PR and locally by running
npm run test-unit:native:debug.Types of changes
test-unit:native:debugnpm script to indeed wait for the node debugger to attachChecklist: