Permalink
Browse files

Using glob to get test files instead of hand-coding them.

  • Loading branch information...
1 parent cbcf9a6 commit 42560b89139028655a6cb0a881720a615fac2144 @Yuffster committed Jan 30, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 tests/run_tests.js
View
@@ -4,8 +4,12 @@ require("describe");
assert = require('assert');
WORLD_PATH = __dirname+"/../example_world/";
-(['messaging', 'advanced_parser', 'world']).each(function(test_module) {
- require(__dirname+"/tests/"+test_module);
-});
-process.exit();
+var glob = require("glob");
+
+glob(__dirname+"/tests/**/*.js", {cwd: __dirname}, function (er, files) {
+ files.each(function(f) {
+ require(__dirname+'/'+f);
+ });
+ process.exit();
+});

0 comments on commit 42560b8

Please sign in to comment.