pouchdb/pouchdb — pull request #3310 by willholley (2014-12-30 17:04:31+00:00)
Title: (#136) - Fix _changes ordering assertions in replication tests

In CouchDB 2.0, _changes is not guaranteed to be ordered. Sort the response before making assertions on the contents.

I've also removed duplicate definitions of the simplifyChanges function so this sort only occurs in one place.