docparse-create-supplier

create supplier objects for use in testing

npm install docparse-create-supplier
36 downloads in the last week
72 downloads in the last month

Create docparse supplier objects for use in testing. The supplier object are saved to a database so the default mongoose connection must be made prior to using this model

Build Status

Dependency Status Dependency tracking by David

Usage

Default object

var inspect = require('eyespect').inspector()
var create = require('docparse-create-supplier')
create(function(err, supplier) {
  if (err) {
    inspect(err, 'error creating supplier')
    return;
  }
  inspect(supplier.toObject(), 'created supplier');
});

With custom data

var data = {
  supplierCode: 'FGS',
  supplierName: 'Foo Gas Supply'
}
var create = require('docparse-create-supplier')
create(data, function(err, supplier) {
  if (err) {
    inspect(err, 'error creating supplier')
    return;
  }
  inspect(supplier.toObject(), 'created supplier');
});

Installation

npm install --save-dev docparse-create-supplier

npm loves you