Merge pull request #1496 from pygy/ospec-bin-faster
[ospec] Speed up the CLI runner by skipping node_modules early
This commit is contained in:
commit
8c31ed643b
1 changed files with 1 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ function traverseDirectory(pathname, callback) {
|
|||
if (err) reject(err)
|
||||
var promises = []
|
||||
for (var i = 0; i < pathnames.length; i++) {
|
||||
if (pathnames[i] === "node_modules") continue
|
||||
pathnames[i] = path.join(pathname, pathnames[i])
|
||||
promises.push(traverseDirectory(pathnames[i], callback))
|
||||
}
|
||||
|
|
@ -31,7 +32,6 @@ function traverseDirectory(pathname, callback) {
|
|||
}
|
||||
|
||||
traverseDirectory(".", function(pathname, stat, children) {
|
||||
if (pathname.indexOf("node_modules") > -1) return
|
||||
if (pathname.match(/(?:^|\/)tests\/.*\.js$/)) {
|
||||
require(path.normalize(process.cwd()) + "/" + pathname)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue