couchdb-fixture

    0.1.1 • Public • Published

    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();
      });
    });

    Keywords

    none

    Install

    npm i couchdb-fixture

    DownloadsWeekly Downloads

    0

    Version

    0.1.1

    License

    none

    Last publish

    Collaborators

    • virtru-corp