Progress aggregator for weighted sub-tasks.
$ pip install pre-commit
This module is installed via npm:
$ pre-commit install --install-hooks
$ npm install subprogress
var progress = require('subprogress')();
progress.registerTask('render', 'Render the things', 1);
progress.registerTask('tidy', 'Tidy up', 2);
progress.emitter.once('progress', function(result) {
expect(result).to.eql({ task: 'one', details: 'desc', percent: 10 });
if (count == 2) done();
});
progress.emitter.once('totalProgress', function(result) {
expect(result).to.be(10/3);
});
progress.updateTask('one', 10);