Commit 676a1143 676a1143fee592e7cfdf83f2ea094fa6bdf37cac by Nicolas Perriault

avoid unnecessary nested ifs

1 parent 1f1d0872
Subproject commit ea64d9917aaf7268a86b9fad010203615a29b9e0
Subproject commit 15c24177c1c3bf1d79aad2e11a38f9d5c50a364f
......
......@@ -21,10 +21,8 @@ function checkSelfTest(tests) {
var isCasperTest = false;
tests.forEach(function(test) {
var testDir = fs.absolute(fs.dirname(test));
if (fs.isDirectory(testDir)) {
if (fs.exists(fs.pathJoin(testDir, '.casper'))) {
isCasperTest = true;
}
if (fs.isDirectory(testDir) && fs.exists(fs.pathJoin(testDir, '.casper'))) {
isCasperTest = true;
}
});
return isCasperTest;
......@@ -89,7 +87,6 @@ this.loadIncludes.forEach(function(include){
}).filter(function(file) {
return utils.isString(file);
});
casper.test.loadIncludes[include] = utils.unique(container);
}
});
......