changed tests to Node 0.10 style - DK/MW

This commit is contained in:
Mathew Woods 2016-10-20 11:48:52 -05:00 committed by Fabian Arndt
parent 17da40f720
commit 7d437b29e6

View File

@ -3,9 +3,9 @@ var fixture = require('./fixture');
var request = require('request'); var request = require('request');
var io = require('socket.io-client'); var io = require('socket.io-client');
describe('authorizer', () => { describe('authorizer', function() {
//start and stop the server //start and stop the server
before(done => { fixture.start({ }, done) }); before(function(done) { fixture.start({ }, done) });
after(fixture.stop); after(fixture.stop);
describe('when the user is not logged in', function () { describe('when the user is not logged in', function () {
@ -36,15 +36,15 @@ describe('authorizer', () => {
}.bind(this)); }.bind(this));
}); });
describe('authorizer disallows query string token when specified in startup options', () => { describe('authorizer disallows query string token when specified in startup options', function() {
before(done => { before(function(done) {
Q.ninvoke(fixture, 'stop') Q.ninvoke(fixture, 'stop')
.then(() => Q.ninvoke(fixture, 'start', { auth_header_required: true })) .then(function() { return Q.ninvoke(fixture, 'start', { auth_header_required: true })})
.done(done); .done(done);
}) })
after(done => { after(function(done) {
Q.ninvoke(fixture, 'stop') Q.ninvoke(fixture, 'stop')
.then(() => Q.ninvoke(fixture, 'start', { })) .then(function() { return Q.ninvoke(fixture, 'start', { })})
.done(done); .done(done);
}) })
@ -73,10 +73,10 @@ describe('authorizer', () => {
}); });
}) })
describe('authorizer all auth types allowed', () => { describe('authorizer all auth types allowed', function() {
before(done => { before(function(done) {
Q.ninvoke(fixture, 'stop') Q.ninvoke(fixture, 'stop')
.then(() => Q.ninvoke(fixture, 'start', {})) .then(function() { return Q.ninvoke(fixture, 'start', {})})
.done(done); .done(done);
}) })