Skip to content

Commit e81460e

Browse files
Increasing coverage
1 parent f3449bb commit e81460e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.jscsrc

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"preset": "node-style-guide",
3+
"requireCapitalizedComments": null,
34
"excludeFiles": ["node_modules/**", "coverage/**", "jsdoc/**"]
45
}

lib/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ var swaggerTools = require('swagger-tools');
2020
function parseApiFile(file) {
2121
var fileExtension = path.extname(file);
2222

23+
/* istanbul ignore if */
2324
if (fileExtension !== '.js') {
2425
throw new Error('Unsupported extension \'' + fileExtension + '\'.');
2526
}
@@ -95,11 +96,12 @@ module.exports.swaggerObject = [];
9596
* @requires swagger-tools
9697
*/
9798
module.exports.init = function(app, options) {
99+
/* istanbul ignore if */
98100
if (!options) {
99101
throw new Error('\'options\' is required.');
100-
} else if (!options.swaggerDefinition) {
102+
} else /* istanbul ignore if */ if (!options.swaggerDefinition) {
101103
throw new Error('\'swaggerDefinition\' is required.');
102-
} else if (!options.apis) {
104+
} else /* istanbul ignore if */ if (!options.apis) {
103105
throw new Error('\'apis\' is required.');
104106
}
105107

0 commit comments

Comments
 (0)