Permalink
Browse files

Updated jake:test task to run all tests in dir.

  • Loading branch information...
1 parent 2399789 commit 65c610c16090a51a8302995d89a82547c04d8727 mde committed May 21, 2012
Showing with 10 additions and 6 deletions.
  1. +10 −6 Jakefile
View
@@ -1,15 +1,19 @@
+var fs = require('fs')
+ , path = require('path');
desc('Runs the Jake tests.');
task('test', function () {
- var cmds = [
- 'node ./tests/parseargs.js'
- , 'node ./tests/task_base.js'
- , 'node ./tests/file_task.js'
- ];
+ var cmds = fs.readdirSync('./tests')
+ .filter(function (f) {
+ return /\.js$/.test(f);
+ })
+ .map(function (f) {
+ return 'node ' + path.join('tests', f);
+ });
jake.exec(cmds, function () {
console.log('All tests passed.');
complete();
- }, {stdout: true});
+ }, {printStdout: true});
}, {async: true});
namespace('doc', function () {

0 comments on commit 65c610c

Please sign in to comment.