Commit 5a551e64 by xzyfer

Fix detection of error specs

Fix false positive when spec has a subfolder called error
parent 08118676
......@@ -39,7 +39,7 @@ module.exports.getSuites = function() {
tests.forEach(function(test) {
var testPath = join(suitePath, test);
var hasErrorFile = fs.existsSync(join(testPath, 'error'));
var hasErrorFile = fs.existsSync(join(testPath, 'error')) && !fs.statSync(join(testPath, 'error')).isDirectory();
var hasError = false;
if (hasErrorFile) {
var errorFileContents = fs.readFileSync(join(testPath, 'error')).toString();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment