diff options
Diffstat (limited to 'tests/javascript')
-rw-r--r-- | tests/javascript/index.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/javascript/index.php b/tests/javascript/index.php index 2664cb9239..702233d622 100644 --- a/tests/javascript/index.php +++ b/tests/javascript/index.php @@ -439,10 +439,14 @@ function PiwikTest() { var src = '<?php $src = file_get_contents('../../js/piwik.js'); $src = strtr($src, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n','</'=>'<\/')); + $src = substr($src, strpos($src, '/* startjslint */')); echo "$src"; ?>'; var result = JSLINT(src); ok( result, "JSLint" ); + if (console && console.log && !result) { + console.log('JSLINT errors', JSLINT.errors); + } // alert(JSLINT.report(true)); }); |