Integration test across the bridge #3933
Unanswered
sundeepgupta
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@sundeepgupta Have you found a solution? I'm also wondering how to best test a Capacitor plugin. My current approach is to have an example app with a button that when clicked uses all the APIs of my plugin, checks the results and uses console.error when the result is not what expected. This way I can make sure that the plugin behaves the same on Android, iOS, and web and I run this manually before every release of the plugin. I would be curious to hear if there is a better way to do it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was wondering if anyone has done this sort of thing already and could explain how it might work.
What I'd like to know is how I could write a test in the web code (JS) that would use native code (iOS in this case is fine). And vice-versa, so that a test in the iOS code that would use JS code.
I'm an iOS developer and I'm wondering if I'd need to setup a duplicate (or perhaps modified for test) Capacitor bridge and web app for the test target for this to work.
Furthermore, how could each platform's test code could control the other platform's dependencies and mocks/fakes/doubles/fixtures/etc.
Beta Was this translation helpful? Give feedback.
All reactions