How to use the @lykmapipo/mongoose-test-helpers.create function in @lykmapipo/mongoose-test-helpers

To help you get started, we’ve selected a few @lykmapipo/mongoose-test-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lykmapipo / mongoose-rest-actions / test / integration / put.spec.js View on Github external
beforeEach(done => {
    father = Guardian.fake();
    aunt = Guardian.fake();
    child = Child.fake();
    child.father = father;

    create(father, aunt, child, (error, created) => {
      father = _.first(created);
      aunt = _.nth(created, 1);
      child = _.last(created);
      done(error, created);
    });
  });
github lykmapipo / mongoose-rest-actions / test / integration / delete.spec.js View on Github external
  before(done => create(father, mother, aunt, brother, child, done));
github lykmapipo / mongoose-rest-actions / test / integration / patch.spec.js View on Github external
beforeEach(done => {
    father = Guardian.fake();
    aunt = Guardian.fake();
    child = Child.fake();
    child.father = father;

    create(father, aunt, child, (error, created) => {
      father = _.first(created);
      aunt = _.nth(created, 1);
      child = _.last(created);
      done(error, created);
    });
  });