Permalink
Browse files

[test] fixed harness

  • Loading branch information...
1 parent 74ec7ab commit f76b0fbbc0c12bc6b95cabdfbddd4e7a24cb742b @0x00A committed Nov 3, 2012
Showing with 11 additions and 12 deletions.
  1. +5 −1 package.json
  2. +1 −1 test/fixtures/tmp/repo-pack
  3. +5 −10 test/{index.js → test}
View
@@ -15,6 +15,10 @@
{
"name": "Paolo Fragomeni",
"email": "paolo@nodejitsu.com"
+ },
+ {
+ "name": "Elija Insua",
+ "email": "elija@nodejitsu.com"
}
],
"keywords": [
@@ -27,7 +31,7 @@
},
"main": "./git.js",
"scripts": {
- "test": "node test/index.js"
+ "test": "./test/test"
},
"engines": {
"node": ">= 0.9.0"
Submodule repo-pack updated from db9c8a to 81e227
@@ -1,12 +1,10 @@
+#!/usr/bin/env node
-//
-// test harness...
-//
var fs = require('fs');
var path = require('path');
var tap = require('tap').test;
-var pathname = './test/tests';
+var pathname = path.join(__dirname, 'tests');
var filter = process.argv[2] || null
@@ -17,15 +15,12 @@ fs.readdirSync(pathname).forEach(function (name) {
if (path.extname(name) === '.js') {
var basename = path.basename(name, '.js');
- var rawfile = path.join(process.cwd(), pathname, basename);
+ var rawfile = path.join(pathname, basename);
var tests = require(rawfile);
for (var test in tests) {
- tap(test, tests[test]);
+ tap(test, tests[test]);
}
}
-});
-
-
-
+});

0 comments on commit f76b0fb

Please sign in to comment.