Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added nodeunit and test script

  • Loading branch information...
commit 5d942fd4cd223ce561156bb63e2cf897f793ce97 0 parents
@caolan authored
Showing with 26 additions and 0 deletions.
  1. +3 −0  .gitmodules
  2. +1 −0  deps/nodeunit
  3. +22 −0 test.js
3  .gitmodules
@@ -0,0 +1,3 @@
+[submodule "deps/nodeunit"]
+ path = deps/nodeunit
+ url = git://github.com/caolan/nodeunit.git
1  deps/nodeunit
@@ -0,0 +1 @@
+Subproject commit 3437a428ef736fbcdae66c92a7a3bb0806f1a2af
22 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']);
Please sign in to comment.
Something went wrong with that request. Please try again.