From 7d437b29e6c6c2c7abe5b205609e67585eab6ce1 Mon Sep 17 00:00:00 2001 From: Mathew Woods Date: Thu, 20 Oct 2016 11:48:52 -0500 Subject: [PATCH] changed tests to Node 0.10 style - DK/MW --- test/authorizer.test.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/authorizer.test.js b/test/authorizer.test.js index ee501df..1a43f02 100644 --- a/test/authorizer.test.js +++ b/test/authorizer.test.js @@ -3,9 +3,9 @@ var fixture = require('./fixture'); var request = require('request'); var io = require('socket.io-client'); -describe('authorizer', () => { +describe('authorizer', function() { //start and stop the server - before(done => { fixture.start({ }, done) }); + before(function(done) { fixture.start({ }, done) }); after(fixture.stop); describe('when the user is not logged in', function () { @@ -36,15 +36,15 @@ describe('authorizer', () => { }.bind(this)); }); - describe('authorizer disallows query string token when specified in startup options', () => { - before(done => { + describe('authorizer disallows query string token when specified in startup options', function() { + before(function(done) { 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); }) - after(done => { + after(function(done) { Q.ninvoke(fixture, 'stop') - .then(() => Q.ninvoke(fixture, 'start', { })) + .then(function() { return Q.ninvoke(fixture, 'start', { })}) .done(done); }) @@ -73,10 +73,10 @@ describe('authorizer', () => { }); }) - describe('authorizer all auth types allowed', () => { - before(done => { + describe('authorizer all auth types allowed', function() { + before(function(done) { Q.ninvoke(fixture, 'stop') - .then(() => Q.ninvoke(fixture, 'start', {})) + .then(function() { return Q.ninvoke(fixture, 'start', {})}) .done(done); })