docparse-create-user

create user document in database for use in docparse tests

npm install docparse-create-user
11 downloads in the last week
46 downloads in the last month

Build Status

Dependency Status Dependency tracking by David

Create Test Users

A module to directly register users in the database for use in tests

Installation

npm install --save-dev docparse-create-user

Usage

var createUser = require('docparse-create-user');

var userData = {
data = {
  username: 'username1',
  password: 'password1',
  email: 'test@example.com',
  remove: true
}

createUser(userData, function(err, reply) {
  if (err) {
    console.log('error creating user', err)
    return;
  }
  console.log('created test user', reply.toObject());
});
npm loves you