mockingjay-npm-wrapper
Wraps the mockingjay server to npm - so you don't have to deal with the binaries manually. Original project: https://github.com/quii/mockingjay-server Supported platforms:
- darvin (Mac)
- linux
Installation
Mockingjay-npm-wrapper requires Node.js v6+ to run. Add mockingjay-npm-wrapper to your project:
$ npm install --save-dev mockingjay-npm-wrapper
How to use
Lets see a protractor example:
const mockingServer = ; ;
The wrapper api is designed to work well with beforeEach, beforeALL, afterEach, afterAll. If you want to use the server outside of those functions, you have to call the callback function manually:
const mockingServer = ; const servCallback = mockingServer; const killCallback = mockingServer; // Mocking server is not available here;// mocking server is running here// ...// mocking server is running here;// Mocking server is not available here
Running the mocking server on a different port (default port is 8000):
const mockingServer = ; mockingServer;