Fork me on GitHub
#cljsrn
<
2019-11-26
>
Quest03:11:08

Does anyone have an example or recommendation to help me start testing my RN app? Jest seems standard in the ecosystem but I'm looking for any solution that can get me off the ground

Quest20:11:42

@UE0HLL163 Looking at chat records, you mention to theller: So I implemented jest based off the PR you linked the other day. For a basic test with no imports it works as expected. Would you mind linking me to this reference PR? It looks like shadow-cljs compile test was the invocation you got working

lepistane12:11:35

So i made an app with re-natal and sente and i can't handle exception i am getting. it happens when i

(sente/make-channel-socket-client!
         "10.0.2.2:3000/producer-chsk" ;; local dev
                nil {:type :auto})
if backend is not up or mobile internet is off i get
console.error: "ERROR [taoensso.sente:1058] - WebSocket error: [object Object]"
I tried putting it in try/catch but it doesnt work i tried using ErrorUtils it doesnt help i tried https://github.com/master-atul/react-native-exception-handler it didn't help nothing can catch that exception to react to it and it breaks the app do you have any suggestions or anything i could try?

thheller12:11:13

there is no exception to catch. it is async in the error event I'd guess. looks like sente is just logging it

lepistane12:11:47

is there a way for me to deal with it? @thheller

thheller12:11:36

hard to say without knowing what the actual error is 😛 sente logging the str instead of the actual object doesn't exactly help

Mark W16:11:04

@joshmiller I got the app to install and load on my real phone by updating the android.index.js file to use 'localhost' instead of 10.0.2.2 (was reverting before out of habit with git checkout to load library config). My previous API endpoints were at http://10.0.2.2:3000/... so I also swapped the location there to http://localhost:3000/... . I then made sure that android:usesCleartextTraffic="true" was in the AndroidManifest.xml file as well as android:name="android.permission.INTERNET", but am still getting a login error that suggest that my app still can't make calls to my backend API....at a loss for what to do next..any help is much appreciated. Thanks again

Mark W18:11:28

@joshmiller Solved this issue....just needed to use my private IP address and connect on same wifi

👍 4
Mark W19:11:32

@joshmiller one remaining difference btwn real and avd....my figwheel prompt doesn't load (tried 'localhost' and private IP in index.js)...any idea there? thanks