Skip to content

Instantly share code, notes, and snippets.

@BoyCook
BoyCook / ServerITSpec.js
Last active May 14, 2019 18:28
Integration testing a node.js web app with Mocha
var should = require('should');
var request = require('request');
var url = 'http://localhost:8080';
var HttpServer = require('./server').HttpServer;
var server;
describe('HttpServer', function () {
before(function (done) {
server = new HttpServer({port: 8080}).start(done);