check the error in the callback of wrap.startServer

This commit is contained in:
Romain Beaumont 2015-09-20 20:26:31 +02:00
parent 2c93a4e796
commit 39d2dfebff

View file

@ -222,7 +222,9 @@ describe("client", function() {
wrap.startServer({
motd: 'test1234',
'max-players': 120,
}, function() {
}, function(err) {
if(err)
return done(err);
mc.ping({}, function(err, results) {
if(err) return done(err);
assert.ok(results.latency >= 0);
@ -241,7 +243,9 @@ describe("client", function() {
});
});
it.skip("connects successfully - online mode (STUBBED)", function(done) {
wrap.startServer({'online-mode': 'true'}, function() {
wrap.startServer({'online-mode': 'true'}, function(err) {
if(err)
return done(err);
var client = mc.createClient({
username: process.env.MC_USERNAME,
password: process.env.MC_PASSWORD,
@ -270,7 +274,9 @@ describe("client", function() {
done();
});
it.skip("connects successfully - offline mode (STUBBED)", function(done) {
wrap.startServer({'online-mode': 'false'}, function() {
wrap.startServer({'online-mode': 'false'}, function(err) {
if(err)
return done(err);
var client = mc.createClient({
username: 'Player',
});
@ -319,7 +325,9 @@ describe("client", function() {
done();
});
it("gets kicked when no credentials supplied in online mode", function(done) {
wrap.startServer({'online-mode': 'true'}, function() {
wrap.startServer({'online-mode': 'true'}, function(err) {
if(err)
return done(err);
var client = mc.createClient({
username: 'Player',
});
@ -335,7 +343,9 @@ describe("client", function() {
});
});
it("does not crash for " + SURVIVE_TIME + "ms", function(done) {
wrap.startServer({'online-mode': 'false'}, function() {
wrap.startServer({'online-mode': 'false'}, function(err) {
if(err)
return done(err);
var client = mc.createClient({
username: 'Player',
});