Commit 676a1143 676a1143fee592e7cfdf83f2ea094fa6bdf37cac by Nicolas Perriault

avoid unnecessary nested ifs

1 parent 1f1d0872
1 Subproject commit ea64d9917aaf7268a86b9fad010203615a29b9e0 1 Subproject commit 15c24177c1c3bf1d79aad2e11a38f9d5c50a364f
......
...@@ -21,10 +21,8 @@ function checkSelfTest(tests) { ...@@ -21,10 +21,8 @@ function checkSelfTest(tests) {
21 var isCasperTest = false; 21 var isCasperTest = false;
22 tests.forEach(function(test) { 22 tests.forEach(function(test) {
23 var testDir = fs.absolute(fs.dirname(test)); 23 var testDir = fs.absolute(fs.dirname(test));
24 if (fs.isDirectory(testDir)) { 24 if (fs.isDirectory(testDir) && fs.exists(fs.pathJoin(testDir, '.casper'))) {
25 if (fs.exists(fs.pathJoin(testDir, '.casper'))) { 25 isCasperTest = true;
26 isCasperTest = true;
27 }
28 } 26 }
29 }); 27 });
30 return isCasperTest; 28 return isCasperTest;
...@@ -89,7 +87,6 @@ this.loadIncludes.forEach(function(include){ ...@@ -89,7 +87,6 @@ this.loadIncludes.forEach(function(include){
89 }).filter(function(file) { 87 }).filter(function(file) {
90 return utils.isString(file); 88 return utils.isString(file);
91 }); 89 });
92
93 casper.test.loadIncludes[include] = utils.unique(container); 90 casper.test.loadIncludes[include] = utils.unique(container);
94 } 91 }
95 }); 92 });
......