Created
May 10, 2012 18:00
-
-
Save tommedema/2654772 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var EventEmitter2 = require('eventemitter2').EventEmitter2, | |
should = require('should'); | |
describe('server', function() { | |
var mediator = new EventEmitter2({ | |
wildcard: false | |
}); | |
require('../../src/routines/server/creator')(mediator); | |
require('../../src/routines/server/configurer')(mediator); | |
require('../../src/routines/server/runner')(mediator); | |
require('../../src/routines/server/routes/registration')(mediator); | |
require('../../src/routines/server/routes/root')(mediator); | |
it('should be created on boot ready', function(done) { | |
mediator.once('server.created', function(server) { | |
server.should.exist; | |
done(); | |
}); | |
}); | |
it('should start route registration after created', function(done) { | |
mediator.once('server.routes.registration', function(server, registrator) { | |
server.should.exist; | |
registrator.should.exist; | |
done(); | |
}); | |
}); | |
process.nextTick(function() { | |
mediator.emit('boot.ready'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment