Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 65c610c16090a51a8302995d89a82547c04d8727 1 parent 2399789
Matthew Eernisse authored

Showing 1 changed file with 10 additions and 6 deletions. Show diff stats Hide diff stats

  1. 16  Jakefile
16  Jakefile
... ...
@@ -1,15 +1,19 @@
  1
+var fs = require('fs')
  2
+  , path = require('path');
1 3
 
2 4
 desc('Runs the Jake tests.');
3 5
 task('test', function () {
4  
-  var cmds = [
5  
-    'node ./tests/parseargs.js'
6  
-  , 'node ./tests/task_base.js'
7  
-  , 'node ./tests/file_task.js'
8  
-  ];
  6
+  var cmds = fs.readdirSync('./tests')
  7
+          .filter(function (f) {
  8
+            return /\.js$/.test(f);
  9
+          })
  10
+          .map(function (f) {
  11
+            return 'node ' + path.join('tests', f);
  12
+          });
9 13
   jake.exec(cmds, function () {
10 14
     console.log('All tests passed.');
11 15
     complete();
12  
-  }, {stdout: true});
  16
+  }, {printStdout: true});
13 17
 }, {async: true});
14 18
 
15 19
 namespace('doc', function () {

0 notes on commit 65c610c

Please sign in to comment.
Something went wrong with that request. Please try again.