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

Leaving out optional rows array doesn't create a db with addDB. #23

Closed monowerker closed 9 years ago

monowerker commented 9 years ago

Documentation website has rows as an optional parameter for addDB: https://github.com/chris-l/mock-couch/blob/093eb546caeb12c43b2542d87536c7c70b49e291/index.html#L46

Leaving it out leads to a database not being created because of early return: https://github.com/chris-l/mock-couch/blob/2de603a4753ee1bced0724e8a6bab7d9aa6e12a4/lib/addDB.js#L17