aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/testsuite.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js
index 7e505979c..faef90a9d 100644
--- a/tests/unit/testsuite.js
+++ b/tests/unit/testsuite.js
@@ -48,6 +48,11 @@ function testJshint( widget ) {
).done(function( hintArgs, srcArgs ) {
var passed = JSHINT( srcArgs[ 0 ], hintArgs[ 0 ] ),
errors = $.map( JSHINT.errors, function( error ) {
+ // JSHINT may report null if there are too many errors
+ if ( !error ) {
+ return;
+ }
+
return "[L" + error.line + ":C" + error.character + "] " +
error.reason + "\n" + error.evidence + "\n";
}).join( "\n" );