Skip to content

Commit a4e71ee

Browse files
author
benholloway
committed
fixed karma and jshint yargs checks
1 parent 4f186c5 commit a4e71ee

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

lib/test/karma.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ function karmaCreateConfig(reporters, configFileName) {
128128
else {
129129
//non-javascript files, such as source maps, should be included but not tested
130130
files.push({
131-
pattern: file.path,
132-
included: false,
131+
pattern : file.path,
132+
included: false
133133
});
134134
}
135135
transformDone();
@@ -164,8 +164,8 @@ function karmaCreateConfig(reporters, configFileName) {
164164

165165
function specTransformFn(file, encoding, specFileDone) {
166166
files.push({
167-
pattern: file.path,
168-
included: false,
167+
pattern : file.path,
168+
included: false
169169
});
170170
specFileDone();
171171
}
@@ -219,8 +219,8 @@ function karmaRun(reporters, bannerWidth) {
219219
//NOTE this workaround is necessary, see issue:
220220
//https://github.com/sindresorhus/supports-color/issues/13
221221
//TODO @bguiz remove workaround when issue has been resolved
222-
SUPPORTS_COLOR: true,
223-
}),
222+
SUPPORTS_COLOR: true
223+
})
224224
});
225225
karmaBackground.on('close', function(exitCode) {
226226
done();
@@ -229,22 +229,22 @@ function karmaRun(reporters, bannerWidth) {
229229
});
230230
};
231231

232-
var yargsOptionDefiniton = {
232+
var yargsOptionDefinition = {
233233
key: 'karma-reporter',
234234
value: {
235-
describe: 'Specify a custom Karma reporter to use. ' +
236-
'Either a locally npm installed module, or an asolute path to one.',
237-
alias: ['k'],
238-
default: defaultReporterName,
239-
string:true,
235+
describe: 'Specify a custom Karma reporter to use. Either a locally npm installed module, or an asolute path to ' +
236+
'one.',
237+
alias : ['k'],
238+
default : defaultReporterName,
239+
string : true
240240
}
241241
};
242242
var checkKarmaReporter = yargs.createCheck()
243243
.withGate(function (argv) {
244244
return !argv.help;
245245
})
246246
.withTest({
247-
karmareporter: function(value) {
247+
'karma-reporter': function(value) {
248248
if (typeof value !== 'undefined') {
249249
try {
250250
getKarmaReporterPluginPath(value);
@@ -253,13 +253,13 @@ var checkKarmaReporter = yargs.createCheck()
253253
return 'Illegal value for "reporter"\n' + ex;
254254
}
255255
}
256-
},
256+
}
257257
})
258258
.commit();
259259

260260
module.exports = {
261261
createConfig: karmaCreateConfig,
262-
run: karmaRun,
263-
yargsCheck: checkKarmaReporter,
264-
yargsOption: yargsOptionDefiniton,
262+
run : karmaRun,
263+
yargsCheck : checkKarmaReporter,
264+
yargsOption : yargsOptionDefinition
265265
};

lib/util/jshint-reporter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ var checkJsHintReporter = yargs.createCheck()
9292
return !argv.help;
9393
})
9494
.withTest({
95-
reporter: function(value) {
95+
'jshint-reporter': function(value) {
9696
if (typeof value === 'undefined') {
9797
return;
9898
}

0 commit comments

Comments
 (0)