summaryrefslogtreecommitdiffstats
path: root/test/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/index.js')
-rw-r--r--test/index.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/index.js b/test/index.js
new file mode 100644
index 0000000..2cfadb1
--- /dev/null
+++ b/test/index.js
@@ -0,0 +1,18 @@
+/**
+ * Mocha test runner.
+ */
+var Mocha = require('mocha');
+var path = require('path');
+
+// Create our mocha instance.
+var mocha = new Mocha;
+
+// Add all the test files.
+mocha.addFile(path.join(__dirname, 'test.js'));
+
+// Run the tests.
+mocha.run(function(failures){
+ process.on('exit', function () {
+ process.exit(failures);
+ });
+});