Matchers & Matchers specs now broken up into individual files. There is now a requireMatchers jasmineRequire function to attach matchers properly.

This commit is contained in:
Davis W. Frank
2013-06-02 22:22:25 -07:00
parent 3271dc8838
commit d53002c63a
42 changed files with 1341 additions and 1173 deletions

View File

@@ -86,25 +86,25 @@ function executeSpecs(specs, done, isVerbose, showColors) {
}
function getFiles(dir, matcher) {
specs = [];
var allFiles = [];
if (fs.statSync(dir).isFile() && dir.match(matcher)) {
specs.push(dir);
allFiles.push(dir);
} else {
var files = fs.readdirSync(dir);
for (var i = 0, len = files.length; i < len; ++i) {
var filename = dir + '/' + files[i];
if (fs.statSync(filename).isFile() && filename.match(matcher)) {
specs.push(filename);
allFiles.push(filename);
} else if (fs.statSync(filename).isDirectory()) {
var subfiles = getSpecFiles(filename);
var subfiles = getFiles(filename);
subfiles.forEach(function(result) {
specs.push(result);
allFiles.push(result);
});
}
}
}
return specs;
return allFiles;
}
function getSpecFiles(dir) {