[Pkg-javascript-commits] [node-async] 01/480: added nodeunit and test script

Jonas Smedegaard js at moszumanska.debian.org
Fri May 2 08:58:06 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository node-async.

commit 5d942fd4cd223ce561156bb63e2cf897f793ce97
Author: Caolan McMahon <caolan at caolanmcmahon.com>
Date:   Thu May 13 18:50:50 2010 +0100

    added nodeunit and test script
---
 .gitmodules   |  3 +++
 deps/nodeunit |  1 +
 test.js       | 22 ++++++++++++++++++++++
 3 files changed, 26 insertions(+)

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..3b65532
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "deps/nodeunit"]
+	path = deps/nodeunit
+	url = git://github.com/caolan/nodeunit.git
diff --git a/deps/nodeunit b/deps/nodeunit
new file mode 160000
index 0000000..3437a42
--- /dev/null
+++ b/deps/nodeunit
@@ -0,0 +1 @@
+Subproject commit 3437a428ef736fbcdae66c92a7a3bb0806f1a2af
diff --git a/test.js b/test.js
new file mode 100755
index 0000000..f41d154
--- /dev/null
+++ b/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']);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git



More information about the Pkg-javascript-commits mailing list