The following steps allows you to run the tests on mobile devices. You need to have Cordova and JXcore installed and available in $PATH.
cordova create jxcore-cordova-tests org.jxcore.jxcorecordovatests jxcore-cordova-tests
cd jxcore-cordova-tests
wget http://az836273.vo.msecnd.net/0.0.8/io.jxcore.node.jx
jx io.jxcore.node.jx
rm -rf www/*
cp -r io.jxcore.node/test/* www/
cd www/jxcore
jx install --autoremove "*.gz,*.md,.*"
cd ../../
For iOS 9 you need to do an extra step and add the following block to plugin.xml into <platform name="ios">
tag:
<platform name="ios">
...
<config-file target="*-Info.plist" parent="NSAppTransportSecurity">
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</config-file>
</platform>
or you can just overwrite plugin.xml with test/plugin.xml:
cp www/plugin.xml ./
cordova platforms add android
cordova plugins add io.jxcore.node
cordova run android
git clone https://github.com/jxcore/jxcore-cordova
cd test/jxcore/
jx install
mocha
#Notes
If running cordova 5.0.0 check that your not affected by this error http://stackoverflow.com/questions/30048429/cordova-does-not-actually-install-app-on-android-device
#Contributions
Tests from the superagent project have been incorporated into this project.