Ghost/core/test/unit/server_spec.js
kirrg001 250d571fe6 improvement: jshint/jscs
no issue
- add mocha option to jshintrc, no need to define globals in files anymore
- call client grunt commands in case of jshint/jscs
2016-06-17 22:59:47 +02:00

21 lines
654 B
JavaScript

var should = require('should'),
http = require('http'),
config = require('../../../config');
describe('Server', function () {
var port = config.testing.server.port,
host = config.testing.server.host,
url = 'http://' + host + ':' + port;
it('should not start a connect server when required', function (done) {
http.get(url, function () {
done('This request should not have worked');
}).on('error', function (error) {
should(error).not.equal(undefined);
should(error.code).equal('ECONNREFUSED');
done();
});
});
});