node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

docparse-create-user

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