Skip to content

Commit

Permalink
added nodeunit and test script
Browse files Browse the repository at this point in the history
  • Loading branch information
Caolan McMahon committed May 13, 2010
0 parents commit 5d942fd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "deps/nodeunit"]
path = deps/nodeunit
url = git://github.com/caolan/nodeunit.git
1 change: 1 addition & 0 deletions deps/nodeunit
Submodule nodeunit added at 3437a4
22 changes: 22 additions & 0 deletions test.js
@@ -0,0 +1,22 @@
#!/usr/local/bin/node

require.paths.push(__dirname);
require.paths.push(__dirname + '/deps');
require.paths.push(__dirname + '/lib');

try {
var testrunner = require('nodeunit').testrunner;
}
catch(e) {
var sys = require('sys');
sys.puts("Cannot find nodeunit module.");
sys.puts("You can download submodules for this project by doing:");
sys.puts("");
sys.puts(" git submodule init");
sys.puts(" git submodule update");
sys.puts("");
process.exit();
}

process.chdir(__dirname);
testrunner.run(['test']);

0 comments on commit 5d942fd

Please sign in to comment.