mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-20 06:51:42 +00:00
close the server when the tests end
This commit is contained in:
parent
ddd38e148a
commit
d1c1c9d77f
2 changed files with 14 additions and 0 deletions
|
|
@ -32,6 +32,13 @@ describe("Server with mineflayer connection", function() {
|
|||
})
|
||||
});
|
||||
|
||||
after(function(done){
|
||||
serv._server.close();
|
||||
serv._server.on("close",function(){
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
describe("commands",function(){
|
||||
it("has an help command", function(done) {
|
||||
bot.once("message",function(message){
|
||||
|
|
|
|||
|
|
@ -7,6 +7,13 @@ describe("Server", function() {
|
|||
done(null);
|
||||
})
|
||||
});
|
||||
|
||||
after(function(done){
|
||||
serv._server.close();
|
||||
serv._server.on("close",function(){
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Is running", function(done) {
|
||||
var client = net.Socket();
|
||||
client.connect(serv._server.socketServer.address().port, '127.0.0.1', done);
|
||||
|
|
|
|||
Loading…
Reference in a new issue