Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Fix detection of error specs
Browse files Browse the repository at this point in the history
Fix false positive when spec has a subfolder called error
  • Loading branch information
xzyfer committed Jan 20, 2016
1 parent b130a95 commit 8ac87c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8ac87c2

Please sign in to comment.