0.0.5 • Published 9 years ago

zentest v0.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

#zentest

zentest saves you some LOC when you're using supertet

var app=...
var request=require('supertest');
request(app)
  .post('/user')
  .send({name:'user',pwd:'secret'})
  .expect(200)
  .end(function(err, res){
    if (err) throw err;
  });

becomes

var app=...
var z=require('zentest')(app);
z.req({'post','/user',{name:'user',pwd:'secret'});

#Install

npm install zentest

#Usage

##Express specs API

See specs

##MongoDB seed API

signature: db(db,[clean],[fixt])

  • db (String) Mongoose connection uri

  • clean (Array of Strings) Mongoose models to empty

  • fixt (Array of 'Fixture' Objects) Seeds for database

    - ```Fixture``` (Object)
    *Properties:*
        - ```model``` (String)
        Name of Mongo model
    
        - ```sample``` (String)
        Sample fixture
    
        - ```parent``` (String)
        Parent object to be merged
    
        - ```count``` (Number)
        How many objects to seed

#License MIT

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago