Comparing version 0.0.2 to 0.0.3
@@ -110,5 +110,11 @@ var sty = require('sty'); | ||
return this._progress + '/' + this._totalNum + ' ' + percent + '%'; | ||
return this._progress + '/' + this._totalNum + ' ' + percent + '%' + this.getProgressBar(percent); | ||
} | ||
Reporter.prototype.getProgressBar = function (percent) { | ||
if(!this._runner._options.progressBar) return ''; | ||
var chunks = Math.floor(percent / 5); | ||
return ' [' + str.repeat('=', chunks - 1) + '>' + str.repeat('-', 20 - chunks) + ']'; | ||
} | ||
module.exports = Reporter; |
@@ -20,3 +20,4 @@ var async = require('async'); | ||
timeout: (isNaN(parseInt(options.timeout)) )? 30000 : parseInt(options.timeout) * 1000, | ||
listFiles: options.listFiles || false | ||
listFiles: options.listFiles || false, | ||
progressBar: (options.progressBar == false) ? false : true | ||
} | ||
@@ -23,0 +24,0 @@ this._stats = { |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"dependencies": { | ||
@@ -12,0 +12,0 @@ "async": "0.2.7", |
@@ -16,3 +16,3 @@ var Runner = require('../../lib/Runner.js'); | ||
var progress = reporter.getProgress(); | ||
assert.equal('5/10 50.0%', progress) | ||
assert.equal('5/10 50.0% [=========>----------]', progress) | ||
})(); |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
13333
343
2