I've recently started using the promises-as3 library (https://github.com/CodeCatalyst/promise-as3) for my (possibly) asynchronous calls. After a slight learning curve, I've got it working in my code and it's been fantastic to use. No more event/commands/callbacks!
After I got everything working, I started writing my unit tests. FML! Unit testing methods that use/return promises has been a pain in the ass to say the least. Has anyone used the promises-as3 library and had good success writing unit tests for them? Luckily I found the TestingPromise library (https://github.com/Hyzhak/testing-promise-as3) but it has its own limitations unfortunately, such as nesting calls. Lastly, when using mockolate and [Mock]ing a class that has methods with a Promise return type, even though the method has been mocked, it is executing the real function... Has anyone seen this issue? Anyway, hoping there are folks out there that have had some success unit testing methods using promises. Any insights? Thanks! -- View this message in context: http://apache-flex-users.2333346.n4.nabble.com/promises-as3-TestingPromise-and-Mockolate-tp6426.html Sent from the Apache Flex Users mailing list archive at Nabble.com.
