daleharvey/pouchdb — pull request #1470 by ig3 (2014-02-21 20:41:21+00:00)
Title: (#1443) test and fix sync interfaces

PouchDB.sync was documented but untested and failing if the callback argument was passed.

db.sync was documented but untested and didn't exist.

Existing sync tests were in incorrect place in test.replication.js: where only one database was initialized, so only running successfully when run after other tests. Moved them to the section initializing two databases.

Added db.sync, fixed sync to handle the callback argument and test two variations of calling each of PouchDB.sync and db.sync.