chris-l / mock-couch

A node.js module designed to mock a CouchDB server, mostly for unit testing purposes.
http://chris-l.github.io/mock-couch/
67 stars 44 forks source link

fix to an issue where save_doc was hanging on some occasions #11

Closed conor-mac-aoidh closed 9 years ago

conor-mac-aoidh commented 9 years ago

Small fix the save_doc.js and addDB.js files.

chris-l commented 9 years ago

Thank you. The unit test was failing with your pull request, but I did a couple of commits to fix them.

(After your change, the tests from get_changes were failing since it wasn't really using addDB to create the database, and therefore the sequence getter wasn't there. The lines with += 1 are the ones that allowed the unit test to pass. But actually doing it that way wasn't really optimal, and is way better to just use addDB)

Thank you!