Skip to content

Commit

Permalink
Using glob to get test files instead of hand-coding them.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuffster committed Jan 30, 2012
1 parent cbcf9a6 commit 42560b8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/run_tests.js
Expand Up @@ -4,8 +4,12 @@ require("describe");
assert = require('assert'); assert = require('assert');


WORLD_PATH = __dirname+"/../example_world/"; 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.