mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-18 22:11:07 +00:00
fix test
This commit is contained in:
parent
73a18ef863
commit
767a3bfba1
2 changed files with 14 additions and 19 deletions
2
app.js
2
app.js
|
|
@ -24,6 +24,6 @@ var options = {
|
|||
regionFolder: settings.regionFolder
|
||||
};
|
||||
|
||||
mcServer.createMCServer(options);
|
||||
module.exports=mcServer.createMCServer(options);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,14 @@
|
|||
var boot = require('../app').boot,
|
||||
shutdown = require('../app').shutdown,
|
||||
port = require('../app').port;
|
||||
|
||||
it('passes', function() {
|
||||
return true;
|
||||
});
|
||||
describe("Server", function() {
|
||||
it("Is running", function(done) {
|
||||
var client = net.Socket();
|
||||
client.connect(25565, '127.0.0.1', function() {
|
||||
client.close(); // or whatever the method to close the socket;
|
||||
done();
|
||||
});
|
||||
client.on('error', function(err) {
|
||||
done();
|
||||
});
|
||||
});
|
||||
var net = require('net');
|
||||
describe("Server", function() {
|
||||
before(function(done){
|
||||
var serv=require("../app");
|
||||
serv.on("listening",function(){
|
||||
done(null);
|
||||
})
|
||||
});
|
||||
it("Is running", function(done) {
|
||||
var client = net.Socket();
|
||||
client.connect(25565, '127.0.0.1', done);
|
||||
client.on('error', done);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue