Skip to content

Commit 069437f

Browse files
committed
Fix ES5 check error reporting
1 parent 2fd0d57 commit 069437f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tasks/test_syntax.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,16 @@ function assertES5() {
218218
var report = cli.executeOnFiles(validFiles);
219219
var formatter = cli.getFormatter();
220220

221+
var errors = [];
221222
if(report.errorCount > 0) {
222223
console.log(formatter(report.results));
223-
224-
// It doesn't work well to pass formatted logs into this,
225-
// so instead pass the empty string in a way that causes
226-
// the test to fail
227-
log('non-ES5 syntax found', ['']);
224+
errors.push('');
228225
}
226+
227+
// It doesn't work well to pass formatted logs into this,
228+
// so instead pass the empty string in a way that causes
229+
// the test to fail
230+
log('es5-only syntax', errors);
229231
}
230232

231233

0 commit comments

Comments
 (0)