It's trivial to emit one change event per batch: that's the way it was 
until I increased batch_size, at which point I added the noted loop to 
satisfy the tests.

I'll remove the loop: one change event per batch, and change the 
affected tests.
On 24/04/2014 9:42 a.m., Dale Harvey wrote:
>
> In lib/replicate.js:
>
> >        }
> >        result.last_seq = last_seq = currentBatch.seq;
> > -      utils.call(opts.onChange, null, result);
> > +      currentBatch.docs.forEach(function () {
> > +        result.docs_written++;
> > +        returnValue.emit('change', utils.clone(result));
>
> However I am completely fine with doing the batch work in a follow up, 
> not adding extra work to this patch is a good thing
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/pouchdb/pouchdb/pull/1963/files#r11925446>.
>