test-agent
Advanced tools
Comparing version 0.20.0 to 0.20.1
@@ -107,13 +107,7 @@ var fsPath = require('path'), | ||
/** | ||
* Finds all files for the suite. | ||
* | ||
* @param {Function} callback first argument is the list of files found. | ||
*/ | ||
findFiles: function findFiles(callback) { | ||
// We will run joinResults() 2 times, so always multiply paths.length by 2 | ||
var pending = this.paths.length * 2, | ||
files = []; | ||
_joinResults: function _joinResults(pending, callback) { | ||
var files = []; | ||
function joinResults(err, found) { | ||
return function(err, found) { | ||
if (err) { | ||
@@ -130,4 +124,14 @@ callback(err); | ||
} | ||
} | ||
}; | ||
}, | ||
/** | ||
* Finds all files for the suite. | ||
* | ||
* @param {Function} callback first argument is the list of files found. | ||
*/ | ||
findFiles: function findFiles(callback) { | ||
var pending = this.paths.length, | ||
joinResults = this._joinResults(pending, callback); | ||
this.findTestFiles(joinResults); | ||
@@ -147,6 +151,9 @@ this.findLibFiles(joinResults); | ||
findTestFiles: function findTestFiles(callback) { | ||
var pending = this.paths.length, | ||
joinResults = this._joinResults(pending, callback); | ||
this.paths.forEach(function(path) { | ||
MatchFiles.find(path, { | ||
fileFilters: [this._filterFile.bind(this, 'test')] | ||
}, callback); | ||
}, joinResults); | ||
}, this); | ||
@@ -156,3 +163,3 @@ }, | ||
/** | ||
* Finds all files in the testDir | ||
* Finds all files in the libDir | ||
* | ||
@@ -162,6 +169,9 @@ * @param {Function} callback | ||
findLibFiles: function findLibFiles(callback) { | ||
var pending = this.paths.length, | ||
joinResults = this._joinResults(pending, callback); | ||
this.paths.forEach(function(path) { | ||
MatchFiles.find(path, { | ||
fileFilters: [this._filterFile.bind(this, 'lib')] | ||
}, callback); | ||
}, joinResults); | ||
}, this); | ||
@@ -168,0 +178,0 @@ }, |
{ | ||
"name": "test-agent", | ||
"version": "0.20.0", | ||
"version": "0.20.1", | ||
"author": "James Lal", | ||
@@ -5,0 +5,0 @@ "description": "execute client side tests from browser report back to cli", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
244412
7389