couchdb-fixture
v0.1.1
Published
Initialize a couchdb database with fixtures meant for use with mocha. The couchdb server that it initializes will not interfere with any couchdb server that is currently running on the system and the server's databases will be immediately removed after ea
Readme
couchdb-fixture
Initialize a couchdb database with fixtures meant for use with mocha. The couchdb server that it initializes will not interfere with any couchdb server that is currently running on the system and the server's databases will be immediately removed after each test.
Usage
var nanoInit = require('nano');
var couchdbFixture = require('couchdb-fixture');
describe('thisIsSomeTest', function() {
couchdbFixture({
'someTestDatabaseName': [
{
_id: "some_doc_id",
value: "some_value"
}
]
}).beforeEach(function(fixtureContext, done) {
nano = nanoInit(fixtureContext.couchdbUrl);
done();
});
});