node-postgres/test-units.js

12 lines
310 B
JavaScript
Raw Normal View History

2010-10-11 07:50:05 +08:00
//executes all the unit tests
var fs = require('fs');
2010-10-24 07:20:29 +08:00
var runDir = function(dir) {
fs.readdirSync(dir).forEach(function(file) {
if(file.indexOf(".js") < 0) {
return runDir(fs.realpathSync(dir + file) + "/");
}
require(dir + file.split('.js') [0]);
});
};
runDir(__dirname+'/test/unit/');