We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d16512 commit 092824cCopy full SHA for 092824c
lib/reporters/json.js
@@ -81,8 +81,11 @@ function JSONReporter(runner, options = {}) {
81
var optionsIndentSize;
82
if (options.reporterOption && 'indentSize' in options.reporterOption) {
83
optionsIndentSize = options.reporterOption.indentSize;
84
+ } else {
85
+ optionsIndentSize = 2; // Default Indentation size
86
}
- var indentSize = parseInt(optionsIndentSize, 10) || 2; // Cast string to int or default indentation
87
+
88
+ var indentSize = parseInt(optionsIndentSize, 10); // Cast string to int
89
90
var json = JSON.stringify(obj, null, indentSize);
91
if (output) {
0 commit comments