Skip to content

Instantly share code, notes, and snippets.

@robksawyer
Created December 5, 2014 06:54
Show Gist options
  • Select an option

  • Save robksawyer/53b3958cb6d82ba34dde to your computer and use it in GitHub Desktop.

Select an option

Save robksawyer/53b3958cb6d82ba34dde to your computer and use it in GitHub Desktop.
/**
* Mocha bootstrap file for backend application tests.
*/
'use strict';
var theLifter = require('./helpers/theLifter');
/**
* Mocha bootstrap before function, that is run before any tests are being processed. This will lift sails.js with
* test configuration.
*
* Note! Tests will use localDiskDb connection and this _removes_ possible existing disk store file from .tmp folder!
*
* @param {Function} next Callback function
*/
before(function before(next) {
theLifter.lift(next);
});
/**
* Mocha bootstrap after function, that is run after all tests are processed. Main purpose of this is just to
* lower sails test instance.
*
* @param {Function} next Callback function
*/
after(function after(next) {
theLifter.lower(next);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment