diff options
author | Felix Nagel <info@felixnagel.com> | 2013-04-02 19:42:19 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2013-04-02 19:42:19 +0200 |
commit | 73c7342bc4418a902bf021c89e7d2c43172e004e (patch) | |
tree | 1c4d622cc91c2cfb76a0ee1e5977ac2b03799551 /tests/unit/testsuite.js | |
parent | 26c528a4a3b712760792c62b005307a2fe0f6ba6 (diff) | |
parent | 09b3533910e887377fc87126608db1ded06f38f6 (diff) | |
download | jquery-ui-73c7342bc4418a902bf021c89e7d2c43172e004e.tar.gz jquery-ui-73c7342bc4418a902bf021c89e7d2c43172e004e.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'tests/unit/testsuite.js')
-rw-r--r-- | tests/unit/testsuite.js | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js index d2403beeb..ddc59ed08 100644 --- a/tests/unit/testsuite.js +++ b/tests/unit/testsuite.js @@ -77,16 +77,22 @@ TestHelpers.testJshint = function( module ) { dataType: "text" }) ).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" ); + var globals, passed, errors, + jshintrc = hintArgs[ 0 ], + source = srcArgs[ 0 ]; + + globals = jshintrc.globals || {}; + delete jshintrc.globals; + passed = JSHINT( source, jshintrc, globals ), + 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" ); ok( passed, errors ); start(); }) |