Created
June 13, 2011 14:07
-
-
Save kuzuha/1022834 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ti.include 'qunit/qunit.js' | |
Ti.include 'qunit/qunit-tap.js' | |
qunitTap QUnit, (message) -> | |
Ti.API.info message | |
xhr = Ti.Network.createHTTPClient() | |
xhr.open 'POST', 'http://192.168.3.2:5000/tap', false | |
xhr.send tap : message | |
, noPlan: true | |
is_dir = (dir) -> Boolean dir.getDirectoryListing() | |
run_tests = (dir) -> | |
test_dir = Ti.Filesystem.getFile dir | |
if not is_dir test_dir | |
return | |
for file in test_dir.getDirectoryListing() | |
path = dir + Ti.Filesystem.separator + file | |
if is_dir Ti.Filesystem.getFile path | |
arguments.callee path | |
else if path.match /\.js$/ | |
Ti.include path | |
return | |
run_tests 'test' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment