Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Anyone got Sinon.js to run on iOS?

$
0
0

I'm currently using ti-mocha to run units within my app. This is working pretty well but I need to use stubs & spies to properly test much of the async functionality in the app. I'm using sinon.js to provide this functionality and it works just fine on Android (tested in Genymotion on Android 4.4.2).

On iOS (7 and 8) however, I get a "Maximum call stack size exceeded" when attempting to require the sinon lib. This seems to be the result of the way sinon is structured internally as it requires a number of submodules which in turn require the parent module thus created a cyclic dependency structure. Android seems to cope with this just fine but iOS freaks out and attempts to repeatedly load sinon and it's child components until it chokes and falls over with the above message.

It's unclear whether this is an issue with Ti's require() implementation or a problem with the underlying iOS functionality.

I've seen this behaviour with both Ti 3.4 & 3.3 SDKs.

Has anyone else a) experienced the same issue & b) worked around it?

p.s. Before anyone recommends it, tishadow refuses to work with my app so it's built-in testing functionality isn't going to be a suitable replacement.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>