File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -46,20 +46,24 @@ var lintOptions = {
46
46
"regexp" : true // allow . and [^ ...] in regular expressions
47
47
} ;
48
48
49
+ var jslintLoaderError ;
50
+
49
51
try {
50
52
lintModule = require ( "jslint/lib/linter" ) ;
51
53
linter = lintModule . lint ;
52
54
assert ( typeof linter === 'function' ) ;
53
55
haveJsLint = true ; // older node-jslint
54
56
}
55
57
catch ( e1 ) {
58
+ jslintLoaderError = e1 . message ;
56
59
try {
57
60
lintModule = require ( "jslint" ) ;
58
61
linter = lintModule . load ( "es5" ) ;
59
62
assert ( typeof linter === 'function' ) ;
60
63
haveJsLint = true ; // newer node-jslint
61
64
}
62
65
catch ( e2 ) {
66
+ jslintLoaderError = e2 . message ;
63
67
}
64
68
}
65
69
if ( ! haveJsLint ) {
@@ -92,11 +96,8 @@ LintSmokeTest.prototype = new Test.Test();
92
96
93
97
LintSmokeTest . prototype . run = function ( ) {
94
98
if ( skipTests ) {
95
- this . fail ( "linter is not available" ) ;
96
- } else if ( typeof linter !== 'function' ) {
97
- this . fail ( "incompatible linter" ) ;
98
- }
99
- else {
99
+ this . fail ( "linter is not available: " + jslintLoaderError ) ;
100
+ } else {
100
101
this . pass ( ) ;
101
102
}
102
103
} ;
You can’t perform that action at this time.
0 commit comments