rn-firebase-bridge
rn-firebase-bridge copied to clipboard
How to test rn-firebase-bridge
Hello,
I am wondering if anyone has a good idea on how to test rn-firebase-bridge.
My app test environment uses mocha, chai, enzyme in a node.js environment.
With now the need to test javascript, swift and java code this no longer can be easily used for all tests.
For now i use hard coded javascript test's code called from a separate test class optionally called from my app at startup (very basic console.log context to get started).
Before this slowly evolves into a test framework i could use ideas/experience from others.
Thanks Piet.
Hi Piet,
I ignored this when I started as I had no idea how to approach testing things across the bridge.
The testing page mentions integration tests but I haven't yet looked into it further.
I've started looking at how this might be done - one option is Appium.
See https://github.com/taskrabbit/ReactNativeSampleApp for example setup
Haven't tried anything yet but seems like a viable option. Kinda awkward in that you would have to setup views to render something based on what you are testing and validate that rather than asserting something directly in the code.
I used https://github.com/user4815162342/simple-test-framework as a starting point. changed it to be react-native ok currently only as a local dir in my project (no npm yet). If you are interested i can share the code.
Hi Piet
I'd be interested in seeing how you are actually using that to test the native code over the bridge (assuming that's what you are doing?)