Skip to content

Instantly share code, notes, and snippets.

@seriousManual
Created August 26, 2013 13:35
Show Gist options
  • Save seriousManual/6341473 to your computer and use it in GitHub Desktop.
Save seriousManual/6341473 to your computer and use it in GitHub Desktop.
var spawn = require('child_process').spawn;
var path = require('path');
var pathToMockServer = path.join(__dirname, '../../tests/mockServer/server');
var mockServerProcess;
before(function (done) {
console.error('\nStarting mock server...');
mockServerProcess = spawn('node', [pathToMockServer]);
setTimeout(done, 1000);
});
after(function () {
console.error('\nStopping mock server...');
mockServerProcess.kill('SIGKILL');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment