Description
Currently there are two mocha suites in existence:
* [titanium-mobile-mocha-suite](
https://github.com/appcelerator/titanium-mobile-mocha-suite)
** This is used in the titanium_mobile repo and is pulled down on each build
* [NMocha](
https://github.com/appcelerator/titanium_mobile_windows/tree/master/Examples/NMocha)
** This is specific to Windows, it lives in the Windows repo and is used for unit tests in the Windows SDK build process
These have diverged over time and there are differences between the two, it has been attempted to merge them previously
https://github.com/appcelerator/titanium_mobile_windows/pull/733
It would be ideal to restart this effort of merging together with the eventual goal of updating the Windows SDK build process to pull the git repository like titanium_mobile
After discussions these are the steps to be taken for this
Work through the test files in comparing them against and updating titanium-mobile-mocha-suite
Merge the results of the above into titanium-mobile-mocha-suite, ensuring we do not cause failures on other platforms
Take the resulting suite from the merge, update NMocha with this for the short term
Investigate how we can use the titanium-mobile-mocha-suite repo in titanium_mobile_windows, initially we should look to use this in the build process, then we should look at how to update NMocha to pull this suite rather than checking the files in
Along the way the following should also be done
* File tickets for FIXME/TODO comments where appropriate, linking them in the mocha suite
A naively generated patch file of a diff between all .js files in Resources/ and Assets/ https://gist.github.com/ewanharris/dad0ba4c37104257335a5d48272fb252
https://github.com/appcelerator/titanium-mobile-mocha-suite/pull/17
Some thoughts I have - Don't use ti.facebook for the test, (or implement it for Windows), we probably want a dummy module of some sort - Should we move ti.map tests out (we still need to split it out of Windows core) - Should we move out tests like geolocation and contacts that seem to prompt and break things. They would be a perfect use for Appium! - Could we try and make HTTPClient less flaky? Avoid external network connections etc. or just skip in general in CI - Could we try and have some sort of percentage hit for total tests ran? Will help prevent the skipping of tests
Closing as done as titanium_mobile_windows has been using the mocha-suite for a while now, kudos to [~kiguchi] and [~cwilliams] for carrying the effort over the line :D